<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/** An instance represents one bowling game */
public class Game {
    private String name= "";  // The person playing the game
    // The scores for the ten frames are in frame[1..10].
    // frame[0] is not used. frame[11..12] are null
    private Frame[] frame= new Frame[13];
    
    private String p; // Used in constructor Game and method stripInt
                      // Contains the balls of the game that have not yet
                      // been processed.
       
    /** Constructor: a game for person n with scores given by String s.
        s contains a list of integers --the rolls of each ball, in turn--
        separated by at least one blank */
    public Game(String n, String s) {
        name= n;
        
    }
     
    // Constructor: A particular game to use for testing
    public Game() {
        name= "SB";
        for (int i= 1; i != 10; i= i+1) {
          frame[i]= new Frame();   
        }
        frame[1]= new Frame(8,1);
        frame[2]= new Frame(9,1);
        frame[10]= new Frame(10,8,2);
        frame[11]= null;
        frame[12]= null;
    }
    
    /** = name of person */
    public String getName() {
        return "";
    }
       
    // Strip off the first integer (which must exist) in field p and return it
    private int stripInt() {
        return 0;
    }
    
    /** = the "card"s of the individual frames, with a blank character separating
          adjacent pairs. (The "card" for a frame[i] is found using the call
          frame[i].card(). Here's an example:
&nbsp;&nbsp;&nbsp;&nbsp;      "X &nbsp;X&nbsp; X&nbsp; X&nbsp; X&nbsp; X&nbsp; X&nbsp; 81&nbsp;9/&nbsp;8/X" */
    public String card() {
        return "";
    }
    
    /** = String representation of the game. This is the toString representation
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     of the 10 frames, each pair being separated by a blank.Here's an example
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     "(10)&nbsp;(10)&nbsp;(10)&nbsp;(10)&nbsp;(10)&nbsp;(10)&nbsp;(10)&nbsp;(8,1)&nbsp;(9,1)&nbsp;(8,2,10)" */
    public String toString() {
        return "";
    }
    
    /** = the score for the game */
    public int total() {
        return 0;
    }
    
    /** = the score card for the game. This is a list of scores for the individual
     frames, each exactly 3 characters (with preceding blanks, if necessary)
     followed by a blank. Here's an example:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&nbsp;30&nbsp;&nbsp;60&nbsp;&nbsp;90&nbsp;&nbsp;120&nbsp;150&nbsp;178&nbsp;197&nbsp;206&nbsp;224&nbsp;244"*/
    public String score() {
        return "";
    }
}</pre></body></html>