STARS WARS EPISODE 0

Job ID: 37997672

Budget: $30 – $250 USD

I am currently working on a simulation exercise set in the "Star Wars" universe, coded in C++. This project is designed to utilize the Model-View-Controller (MVC) architectural pattern, aiming to clearly separate the business logic, user interface, and user input processing. The purpose of this simulation is to dynamically model the operations of the Galactic Empire, specifically focusing on the transportation and management of crystal resources under the threat of Rebel attacks.

Technical Details

Programming Language: The entire simulation is developed in C++. I am required to adhere to modern C++ standards, specifically using features from C++11 onwards. This includes leveraging smart pointers like std::unique_ptr and std::shared_ptr to manage memory automatically and safely, which helps prevent memory leaks and pointer-related errors.

Design Patterns:

Model-View-Controller (MVC): I'm using MVC to organize the codebase efficiently:
Model: Manages the data and the rules of the simulation. It is responsible for updating the state of each simulation element, handling logistics, and storing the positions and statuses of all entities like spaceships and stations.
View: Handles all output representations to the user. In this case, it involves rendering a spatial map of the simulation entities on a console or a graphical interface.
Controller: Processes all user inputs, translating them into actions in the model or updates in the view. It acts as the intermediary between the Model and the View.
Abstract Factory: This pattern is utilized for creating objects belonging to a family of classes, such as different types of spaceships (Shuttle, Bomber, Destroyer, Falcon) and Imperial agents (Midshipman, Commander, Admiral) without specifying their concrete classes in the code.
Smart Pointers: The usage of smart pointers is a requirement to manage resources within the simulation. Smart pointers provide a mechanism for memory management that includes automatic allocation and deallocation of memory, thus reducing bugs related to memory misuse.

Error Handling and Input Validation: Robust error handling mechanisms are essential to ensure the simulation runs smoothly without crashes. Inputs are validated rigorously, and any errors in commands or data are handled through exceptions and appropriate error messages are displayed.

Performance Considerations: The implementation must be optimized for performance. This involves minimizing computational overhead and optimizing data structures and algorithms used within the simulation. The use of move semantics is particularly emphasized to optimize the management of resource-heavy objects.

Compilation and Documentation: The final program must compile without errors or warnings using GCC with the -std=c++11 flag. Comprehensive documentation is necessary to describe the functionality of each class and function using comments within the code.

i added files that contains input and output and a word.docx that conatins all the exersice explanation
Related categories: C++ Programming MVC