Create a program uses loops to output some information


Assignment:

Week3Project2

Write a program that uses loops to output some information.

The program should have two classes.

The class with the main method should be named CountXXXStart.

The other class should be named CountXXX.

The CountXXXStart file should provide a menu using a switch statement.

The switch statement should include a while statement so the user can make more than one selection on the menu.

The switch statement should also provide an option to exit the program when the user is ready

The CountXXX class should use methods with self explanatory names to process and output the desired results.

The first method should output the counting numbers six numbers per line from 76 to 28 in descending order.

The second method should output all the counting numbers greater than 28 and less than 44 or greater than 56 and less than 88 in ascending order with 4 numbers printed to a line.

The third method should have the user enter two counting numbers. Print to the DOS window all the counting numbers greater in value than the lowest number entered but less in value than the highest number entered. Have the program print three numbers per line on the output in ascending order.

Week4Project1

Your Week4Project1 coding project file should be named PeopleXXX.java

The program should allow the user to enter the weight in pounds of an indefinite number of people. Have the user enter the weights as integer values. Use a sentinel value of -1 when you are done entering the information.

Calculate the average weight for all the people.

Print the average weight of all the people to the DOS screen.

Print to the DOS screen the number of people on which information was entered.

Print the highest weight and the lowest weight of all the weights entered.

Week4Project2

Your Week4Project2 coding project should contain two classes.

One class should be named DogProgramXXX and the other DogXXX.

The DogProgramXXX class should contain the main method.

The DogProgramXXX class should create six instant Dog objects using the DogXXX class.

The program should assign identifiers to each of the Dog objects created.

The DogXXX class should contain one method named dogData().

The dogData() method should accept four arguments for each of the objects created.

The arguments should be the name, species, sex, and currentAge.

Display in the DOS window the four attributes of each Dog object created.

Also calculate and display each Dog's age in dog years. (Assume 1 human year equals 7 dog years so a 3 year old dog would be 21 in dog years.)

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a program uses loops to output some information
Reference No:- TGS01935226

Now Priced at $30 (50% Discount)

Recommended (94%)

Rated (4.6/5)