Skip to content

modul-404-gruppe-3/P1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P1

THEME: Doing Calculations

DESCRIPTION

Implement three different small programs which deal with calculations.Program no1: this program calculates the distance of lightning.Program no2: this program converts Celcius to Fahrenheit and vice versa.Program no3: this program calculates the age of a person.

IDEA, EXAMPLE

Program no1

Use the double datatype to calculate the distance. Sound travels one kilometer every three seconds. In order to calculate the distance, just divide the number of seconds by three.

Program no2

This is a classic program and maybe you have already done this in C. See how you can re-use your code from the previous module. If this a new program, then figure out what datatypes you should use. Let the user decide if he what temperature type he wants to calculate.

Program no3

Let the user enter his birthday (day, month, year) and convert this input into a suitable date object. Now calculate the exact age with the current time.

DIFFICULTY

Using the correct datatypes for the calculations. Using the correct date type to calculate the age.

SCALABILITY

These mini programs can be combined into one larger program. How do you integrate this in your main-method? Instead of using primitive types like int or double, use the corresponding Wrapper classes and therefore work with objects. What changes? What is different? Note down your findings and explain this to your teacher.

PROCESS

Write each program separately in own classes. Each program has its own main-method.

About

this project is for the competence P1 in the Modul 404

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages