Skip to content

This repository contains the some exercises for apply the object modeling in Java SE POO.

License

Notifications You must be signed in to change notification settings

nqs48/SofkaS2T2-ModelamientoObjetos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SofkaS2T2-ModelamientoObjetos

This repository contains the same exercises for apply the object modeling in Java SE POO.

About The Project

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.


EXERCISE 1:

  • 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.

EXERCISE 2:

  • 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?

EXERCISE 3:

  • 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).

EXERCISE 4:

  • 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.

EXERCISE 5:

  • 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.

EXERCISE 6:

  • 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.

PROJECT REVIEW:

Preloaded Data

You can choose preloaded data or init the library empty.

image

Main Menu POO: OBJECTS MODELING

Choose the exercise that you want.

image


EXERCISE 1:

Submenu Planetary System

Create and View, a abstraction of a planetary system.

image

View Stars

View the complete list of stars.

image

Create Planets

Add new planet to planetay system.

image

Calculator Gravitational Force

Calculates the graviational force between two bodies.

image


EXERCISE 2:

Submenu Current Main Classes

View a sort explanation about the main classes in java.

image

View the complete explanation in the Readme File -> README.MD

image


EXERCISE 3:

Submenu Sort Random Array

Sort methods aplicated to arrays.

image

Bubble Sort

Sort random arrays with bubble sort.

image


EXERCISE 4:

Submenu Ferry Control v1.0

Vehicles control system .

image

Start a Ferry

Star a new journey.

image

Add vehicles to ferry

Add vehicles to the ferry's jurney.

image

Control the capacity

Control the number of vehicles that enter.

image

Complete and prints

Complete the ferry's capacity and prints.

image


EXERCISE 5:

Submenu Ferry Control v2.0

New version of Ferry control with differents vehicles.

image

Add diferents vehicle

Creates different types of vehicles.

image

image

View and Classify

View and classify vehicles by type.

image


EXERCISE 6:

Vector: Dynamic Array

Implements the "dynamic array" abstraction with the Vector class.

image

Complete the condition and prints

Complete the condition and the proccess ends and prints.

image


Built With

This section contains the platforms that were used for the project.

Installation

Install each one the pieces of software previously mentioned.

  1. Clone the repo
  • HTTPS

    https://github.com/nqs48/SofkaS2T2-ModelamientoObjetos.git
    
  • SSH

    [email protected]:nqs48/SofkaS2T2-ModelamientoObjetos.git
    
  1. Open the project with the IDE IntelliJ Idea

License

Distributed under the MIT License. See LICENSE.txt for more information.


Collaborators

Nestor Quiroga Suarez
Jr. Software Developer

Project Link: https://github.com/nqs48/SofkaS2T2-ModelamientoObjetos

(back to top)

About

This repository contains the some exercises for apply the object modeling in Java SE POO.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages