Discussion Section 12: Design your program
Due: 10pm Tuesday April 17
Purpose: In this discussion
section, you will practice how to design classes and methods for your program.
The objective of this assignment is to practice on how to distribute the program functionality among the various classes you define. For example, in the Connect Four game you should normally provide a Game class and a Board class which interact via the methods they define and build up, along with other classes too, the program functionality. After identifying all the necessary classes, you will define the appropriate instance variables and methods for each of them. You will not write code to implement any of these methods. Instead, you will just define their signatures (parameters and return type) and you will write in comments what each method is supposed to do and which instance variables of the class it uses. Inside the main method of your program, you will also have to provide a general outline of the logic of your program, that will contain calls to the methods of the other classes that you have defined and which will essentially show how the execution of the program is orchestrated.
For each of the classes that you will define, you must provide a .java file with the class definition, the instance variables and the definition of methods. Since the methods will contain just comments and no code, in the cases where a method is supposed to return a value, you will return a "dummy" value of the appropriate type. For example, if a method returns an integer, just add a 'return 0;' statement. All your classes must compile successfully, even though you don't have an implementation for their methods.
You will turn in a zip file named Connect4.zip, which will contain the source code for all the classes that you have defined. The main method of your program should be defined in a class name Game.java.