Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have this programming homework that I cannot complete on time without help. I have provided the requirements and a bit of my program. This

I have this programming homework that I cannot complete on time without help. I have provided the requirements and a bit of my program. image text in transcribed

This simulates a video game's playthrough involving the Player and Opponents Classes: Player, LobbySettings, Opponent GameSettings function: set_Difficulty(), set_Opponent() Each playthrough, the console will print out the user's name, difficulty chosen, save slot picked (1,2,3 or 4), kills, death, and duration is taken for that game.

Use of random so each game will print out different outcomes

Use of static variable: total number of opponents that have spawned in the game

Use of operator overloading: Overload the 1. User input and run time i. The program must involve some sort of user input. ii. For every piece of code that you write, it must be possible for that code to run depending on the user input. This rule excludes getters and setters. iii. The program must do several things each time it runs. As a non-example, the user should not be able to type in "demonstrate copy constructor", after which the copy constructor gets demonstrated and the program ends. Don't overthink this rule. This rule only exists so that you do not cheese the project and actually write a program. iv. Your program should not have existing data unless it makes sense to do so. For example, if you write a program to keep track of a bank, there should be no customers/accounts when you first run the program. v. The program should have some way of seeing what is going on (e.g., it should print to the console). - For a program where you enter commands, this means having a command which allows you to view the data which is being tracked. - For a program that simulates something, this means that each time step, you should output what happened that time step and at the end of the simulation, print out the final state of everything. 2. Class structure i. The program must implement at least 3 classes. ii. Only one type of class can be instantiated in int main or outside of another class. The rest of the objects should be created inside of other classes. - For example, if you have an ecosystem class, an animal class, and a plant class, all of the animal objects and plant objects should be contained within the ecosystem class, and should not be accessible to int main. - Make sure that the class that you instantiate in main embodies abstraction. - To that end, if you make a program that involves you typing in commands, the public functions of that class should correspond to the various commands. - If you make a simulation program, the public functions of that class should be for setting up the simulation and running the simulation. iii. Your classes should have, between them, at least 5 member variables and 6 member functions, not including constructors, copy constructors, destructors, overloaded operators, or getters/setters - If you choose to have more than 3 classes, there should be 3 classes that, between them, satisfy the above requirement iv. Your classes should be defined using a 2 file structure and header guards v. Your classes should embody encapsulation and abstraction vi. All class objects should be instantiated as pointers and should be deleted by the time that program ends. Destructors should be implemented when appropriate. 3. Additional requirements i. There must be at least one static variable and it must do something. ii. Your program must implement either the copy constructor or operator overloading

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions