Question: Create a Java role playing game that has at least 3 classes, two that work together plus a separate class containing main (like the PlayGames
Create a Java role playing game that has at least 3 classes, two that work together plus a separate class containing main (like the PlayGames exercise).
Use of appropriate kinds of instance variables, initialized in constructors.
Implementation of constructor(s) and standard getter/setter methods (if needed) plus other required methods.
Creation and use of objects from these classes in the main method to play and test the game.
Use of if/else and while/for/for-each statements plus functions/methods, possibly nested.
Functions and methods must have appropriate parameter and return types.
Use of arrays or Lists (flexible arrays), possibly Maps.
Use of files to hold text or numeric data rather than putting lots of Strings or numbers in program source code.
Use of IO methods as appropriate to interface with files.
Use of the main method to control user input and output and allow the user to test the program.
Tests created in main should exercise (all) code paths in all classes, including error cases ("safety").
Optional: create static test functions in each of the non-test classes that can be called from main to test those by themselves (unit tests).
All parts of the Project / program must be well structured using methods and functions so that the structure is easy to read and follow. Use good principles of Object Oriented Design to do your implementation (encapsulation, information hiding, etc).
Clearly separate the public interfaces of classes, interfaces, and methods from their detailed internal and private implementations
If you find yourself wanting to copy the same code in multiple places, or code that only differs a little, turn that code into a function or method!
All code must be well written with readability in mind. Use the style conventions introduced in class and in the text, including naming and indentation. The goal is code that others can read and understand the program (and possibly modify it without your help).
Program classes and methods should have complete and concise internal documentation, not over-done but sufficient for someone who is not familiar with the program to understand it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
