This repository contains the same exercises for apply the object modeling in Java SE POO.
In the following list of exercises, perform each of them individually. Each exercise should be delivered to a single Git repository, separate each exercise into subfolders.
- Develop a class in Java that performs the abstraction of a planetary system, taking into account for each body of the system aspects such as: mass, density, diameter, distance from the sun (suppose circular orbits), a unique identifier number and a textual name . Include methods that calculate the gravitational attraction between any two bodies in the system.
- Is it possible to run a java program that contains multiple classes with main methods? If yes, how is the entry point to a program determined?
- Write a java program that randomly generates (Hint: See Math class for how to generate random numbers in java) an array of real numbers, and sorts it using the bubble algorithm or quick sort (this should be user selectable).
- You want to implement the control of a Ferry. To do this, create a Vehicle class. Include aspects common to all vehicles such as number of passengers, presence or absence of crew, number of wheels, registration date, means of travel, etc. Include the methods you consider appropriate. Make a program capable of reading the data of 10 vehicles from the keyboard and list them on the screen below.
- Starting from the previous class, and through inheritance, create new classes that allow you to differentiate whether the object is a car, a motorcycle, a truck, a bicycle, or a boat. Include in each class some specific attribute that differentiates it from the others. For example, for the car a boolean that determines if it has three or five doors, for the truck the height (regardless of the other vehicles), etc. Carry out a program like the one in the previous exercise capable of working with the different types of vehicles.
- An interesting predefined class in the java language is the Vector class, which implements the "dynamic array" abstraction. Review the class and use it (in different files) to make a program that reads numbers from the keyboard until the same number is entered twice in a row. Then the program shows all the entered numbers and ends.
You can choose preloaded data or init the library empty.
Choose the exercise that you want.
Create and View, a abstraction of a planetary system.
View the complete list of stars.
Add new planet to planetay system.
Calculates the graviational force between two bodies.
View a sort explanation about the main classes in java.
View the complete explanation in the Readme File -> README.MD
Sort methods aplicated to arrays.
Sort random arrays with bubble sort.
Vehicles control system .
Star a new journey.
Add vehicles to the ferry's jurney.
Control the number of vehicles that enter.
Complete the ferry's capacity and prints.
New version of Ferry control with differents vehicles.
Creates different types of vehicles.
View and classify vehicles by type.
Implements the "dynamic array" abstraction with the Vector class.
Complete the condition and the proccess ends and prints.
This section contains the platforms that were used for the project.
Install each one the pieces of software previously mentioned.
- Clone the repo
-
HTTPS
https://github.com/nqs48/SofkaS2T2-ModelamientoObjetos.git
-
SSH
[email protected]:nqs48/SofkaS2T2-ModelamientoObjetos.git
- Open the project with the IDE IntelliJ Idea
Distributed under the MIT License. See LICENSE.txt
for more information.
Nestor Quiroga Suarez
Jr. Software Developer
- LinkedIn => Nestor Quiroga Suárez
Project Link: https://github.com/nqs48/SofkaS2T2-ModelamientoObjetos