Question: In this assignment, you will practice writing classes. 1 Create a project called ProjectOne. In the main ( ) method, declare and integer variable x

In this assignment, you will practice writing classes.
1 Create a project called ProjectOne. In the main() method, declare and integer variable x. Using a loop, print a countdown from x to 0.
2 Inside ProjectOne, write two methods
a) One to compute the average of two numbers.
Will this method require any inputs?
Will it have a return value?
b) Another method that prints the current age of a student when given the year of birth.
Will this method require any inputs?
Will it have a return value?
3 Consider the methods you wrote in Question 2):
a. Can you write the preconditions
b. Can you write the post-conditions?
c. Can you write some statements that detect when the precondition is violated and print a message?
4 Create another project called Practice: Then create the following four classes:
a. Pizza
b. Student
c. Car
d. Television
5 Add a fifth class to the Practice project to represent an object of your choice. Come up with three fields related to your object. For now, choose fields that are able to be represented as a letter, number, or true/false (primitive data types). Please format in pseudo-UML. ****Must describe an individual thing, not a set. For example: shoe size vs number of shoes
- Shoe size is a description of one pair of shoes
- Number of shoes is a description of a collection of shoes
6 Create a project called DogApplication. Create a class based on the following pseudo-UML representation:
7 Add a driver class to the DogApplication project
please answer allquestions thank you !

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!