CIS*2430 Assignment ThreeThe Big PictureThis assignment consists of one fairly large task.1. Create a game suite that permits the user to use a graphical application and choose between playing...

2 answer below »


Create a game suite that permits the user to use a graphical application and choose between playing two





different games: Tic Tac Toe and Numerical Tic Tac Toe. And to be run in gradle




CIS*2430 Assignment Three The Big Picture This assignment consists of one fairly large task. 1. Create a game suite that permits the user to use a graphical application and choose between playing two different games: Tic Tac Toe and Numerical Tic Tac Toe You can clone your assignment repo in one of two ways using a terminal or command prompt: • git clone https://gitlab.socs.uoguelph.ca/2430f22/≪your username here≫/A3.git • With ssh from on campus: git clone [email protected]:2430f22/≪your username here≫/A3.git This assignment is intended to be independent work. Your submissions will be programatically inspected to identify possible plagiarism. Learning Outcomes Completion of this assignment will help you master the course learning outcomes noted below. • Design and implement classes for an object-oriented program demonstrating correct use of encapsulation, constructors, method overloading, class invariants, accessors, mutators, instance variables and class variables. • Construct class hierarchies that maximize code reuse through inheritance while accommodating differences through method overriding. • Describe polymorphism and identify situations in which it is used in an OO program. . • Use polymorphism, abstract methods/classes, and interfaces effectively to produce generic code • Compare event-driven programming with control-driven programming Grading Assignment Grade Calculation: GS*PI Component Symbol Grade Range Marking Process Game Suite GS 0.0-100.0 Instructional team member marks submission on their own schedule during grading period Personal Interview PI 0.0-1.0 Students must schedule the interview with an instructional team member using the scheduler on the course website. Failure to at- tend an interview will result in a grade of 0.0 for this component. 1 Programming Tasks A partially complete example application that follows the structure required for this assignment can be found at https://gitlab.socs.uoguelph.ca/examples/exampleguiproject.git. The example provides work- ing code to show the mechanics of accomplishing the tasks in this assignment but it is not a well designed user interface and should not be used as a model for how your assignment should look. Game Suite Application Features You will create an application with a graphical user interface that permits the operator to play either Tic Tac Toe or Number Scrabble. The application must allow, as a minimum, the following uses: • Permit the user to quit one game and start another game without exiting the application. • Users may quit an unfinished game. • Users may exit the application when games are in-progress. • Permit the user to save an in-progress game to a csv file. • Permit the user to load a saved game from a csv file. The game-specific csv file formats are noted with each game description. • Keep a record of each user’s game use including wins, losses, and games played. – Players must be able to save and load their personal statistics file (think of it as a player profile). – Saving and loading of player profile files should be offered as a choice on game startup and quit. – You may determine the contents and structure of the player save file. – You should define and use any text file format you think is appropriate. Describe it in your README. – The player profile file can contain as many additional player characteristics as you wish. Software Development Techniques Your graphical application must demonstrate the following software development techniques: • You may NOT use a software GUI builder of any sort for this assignment. This includes plugins to IDEs as well as standalone applications such as GuiGenie or JFormDesigner. • You will use lambda notation for Action Listeners. Do not have any GUI component implement the Action- Listener interface. • You must use at least two different Layout Managers. • Your solution must include JFrame, JPanel, JLabel, JOptionPane, JFileChooser, JMenuBar, and JMenu classes. Other Swing classes may be used as desired. Do not use JavaFX. • You must separate the user interface (the view) from the game (the controller). This will be explained more in subsequent sections. • You must create a Player class that implements the boardgame.Saveable interface for the purposes of saving and loading the user profile. • You must create a class that handles the saving of games and users to text file by accepting parameters of type Saveable. This class should have static methods that wrap the java file saving and loading mechanisms. You may use boardgame.ui.PositionAwareButton if you wish to do so. You may also use the method private JPanel makeButtonGrid(int tall, int wide)from the kakuro.KakuroGrid class in the example program. You may use the kakuro.KauroView and the game.GameView classes as a reference, but you may not directly copy any part of those classes other than the previously mentioned private method. Numerical Tic Tac Toe Numerical Tic Tac Toe is a 2 player game that is played on a 3x3 gameboard with integers 0 through 9. https: //mathequalslove.net/numerical-tic-tac-toe/. One player uses only the odd numbers. One player uses only the even numbers. The player with the odd numbers always goes first. A player who makes a line of numbers that adds to 15 wins. 2 Features • The player must be able to enter a number to take their turn. • The game must prevent the player from entering incorrect input without crashing or exiting. • The player must be able to choose the location of the number they wish to enter by clicking on the location. • Users must have the option of playing again or returning to the main screen at the end of a game. • The game must keep track of whose turn it is. • The game must identify win and tie conditions. • The game must notify the players when the game is over and must indicate the winner (or the state of a tie). Software Development Techniques • Your solution must have a class representing the game that extends boardgame.BoardGame and implements the boardgame.Saveable interface. • Your solution must have a class representing the board that extends boardgame.Grid. • You may not change any of the classes in the boardgame package. • All public, protected, and package-private methods must have javadoc comments. • The load/save file must be a csv formatted file. – The first row of the file indicates which player had the most recent turn (O or E) – The next three rows of the file are comma delimited numbers that represent the spaces on the grid. – The absence of a number between commas indicates an empty space on the gameboard. – e.g. 1,,2 indicates that a row has a 1 in the first column, nothing in the second, and a 2 in the third. – An example save file is included in your A3 git repository. • Use exceptions for error handling. • All input and output must occur through the graphical user interface. You may not use System.out or Sys- tem.in via the command line. • You are not required to submit junit test files but you may if you wish. Tic Tac Toe You will reimplement tic tac toe as a graphical game. You may use parts of your first assignment if you wish but you are not required to do so. Features • The player must be able to enter an X or an O to take their turn. • When it is X’s turn, only an X should be allowed as input. When it is O’s turn, only an O should be allowed as input. • The player must be able to choose the position of their play by clicking on the location. • Users must have the option of playing again or returning to the main screen at the end of a game. • The game must keep track of whose turn it is. • The game must identify win and tie conditions. • The game must notify the players when the game is over and must indicate the winner (or the state of a tie). Software Development Techniques • Your solution must have a class representing the game that extends boardgame.BoardGame and implements the boardgame.Saveable interface. • Your solution must have a class representing the board that extends boardgame.Grid. • You may not change any of the classes in the boardgame package.. • All public, protected, and package-private methods must have javadoc comments. • The load/save file must be a csv formatted file. – The first row of the file indicates which player had the most recent turn (X or O). – The next three rows of the file are comma delimited numbers that represent the spaces on the grid. 3 – The absence of a character between commas indicates an empty space on the gameboard. – e.g. X,,O indicates that a row has an X in the first column, nothing in the second, and an O in the third. – An example save file is included in your A3 git repository. • Use exceptions for error handling. • All input and output for the graphical interface must occur through the graphical user interface. You may not use System.out or System.in via the command line when the graphical interface is being used. • You are not required to submit junit test files but you may if you wish. • An additional requirement for Tic Tac Toe only is that you must also have a class called TextUI that can run a command line version of the Tic Tac Toe game. – The TextUI class ONLY runs the Tic Tac Toe game. The user has no option to run Numerical Tic Tac Toe and no option to save/load a user profile. – The TextUI does not have to offer an option to save/load game files, but that would be a nice feature. – It can look very much like the game you submitted for A1. – TextUI must use the same game class as the graphical UI. – TextUI must use the same board class as the graphical UI. – You are expected to separate the view (the UI) from the game (the game and board classes) so that the two UIs can utilize the same code base. – TextUI must be the only class that prints things using System.out and the only class that accepts user input via a Scanner on System.in. – The TextUI and the graphical application will never be run simultaneously. If you believe that you already have a code base that demonstrates the use of polymorphism, and you would like to use your own code base for this assignment instead of the super classes and interfaces given please email the course email address. Judi will inspect your code base and have a conversation with you about your request. If you are unsure whether your code demonstrates the use of polymorphism, it probably does not and you should complete the assignment as written. Submission • Your submission for this assignment must be pushed to the main branch of your A3 git repository. • It must adhere to gradle standard layout and must make use of packages to identify different code modules. • As this assignment produces a graphical application, it will not run on the docker container. We will compile to a jar file and your gradle file must indicate how to run your application from the jar file. The build.gradle file in your repository has most of the work done for you. You will need to edit the gradle file to ensure that all the names of classes are correct. • Your repository has been initialized with a build.gradle file, an updated checkstyle xml file, sample save files, the enhanced JButton class, and the source code for the two classes that you must extend. You must add any other files, including a Readme. • The updated checkstyle xml relaxes some rules to make GUI development easier and adds some rules to further enforce encapsulation and clean code. • A .gitlab.yaml file has also been added to your repository that enables the continuos integration feature of giltab. Each time you push to gitlab, gradle build will be run on the committed code and the results will be available on the gitlab web interface. You can use this to ensure that you have correctly committed and pushed all files. • You must submit a placeholder (see below) to the A3 submission so that we know you wish to have A3 graded. The missing code review Because this assignment is longer than A2, there is no code review component. You are advised to spend some time reflecting on the use of inheritance and interfaces in this assignment prior to the final exam. However, we need you to submit something to the A3 submission dropbox as that is how we know you want us to grade it. Submit anything that is suitable for work. It can be art you have created, a poem or story you have written, some saying that is meaningful to you, a developers journal that details your progress through the 4 assignment, a text file with a short message, a picture of your pet, etc. Just submit some sort of file as the flag that we are to mark your A3. Evaluation Your submission must compile without errors or warnings and must pass checkstyle to be awarded a grade other than zero. 50 of the marks are for demonstrating good object oriented design. Elements examined will include: • cohesion of classes and encapsulation • coupling of classes and allocation of responsibility and purpose for classes and methods • use of exceptions and error handling • implementation of polymorphic behaviours using inheritance and interfaces • encapsulation of the UI and the games. 50 of the marks are for the functionality. Elements examined will include: • game play • correctness of required features • user
Answered 6 days AfterNov 16, 2022

Answer To: CIS*2430 Assignment ThreeThe Big PictureThis assignment consists of one fairly large task.1....

Manish answered on Nov 22 2022
35 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here