This repository is a development of a challenge in DevSenior where a simulation of a journey to space is made, choosing the planet and a spacecraft, showing the collection until reaching the planet, implemented OOP and MVC to practice this design in its different layers.
This project simulates a space travel system where users can select destination planets, choose ships, assign passengers and visualize the progress of their paths through a console simulation. It is developed following the MVC pattern (model-view-controller) to maintain a clear and scalable structure.
Responsible for managing the flow of the application and coordinating the interaction between the models and the view.
- PlanetController Organize the selection of planets, ships and the simulation of the trip. Valida tickets and communicates results through the ConsoleUI interface
- Manage the main menu and redirect user actions according to the chosen option.
It contains the business logic, data structures and central functionalities of the system.
- Planet Represents the available planets, including its name and distance in millions of kilometer
- Spacecraft Base class for different ships, with attributes such as speed and passenger capacity.
- SpacecraftService Administers passenger validations and travel time calculation based on the speed of the ship and distance of the planet
- SimulationTripService Execute a visual simulation of the path of the path using key loops and messages.
It is responsible for interacting with the user through the console.
- ConsoleUi Sample menus, request information, and present dynamic messages related to the trip.
- It presents data in friendly format and guide to the user throughout the flow of the program.
Practice OOP and MVC for future projects, ti be able to understand what classes correspond to each MVC layer, understand how to apply OOP in each step of the project.