[SOLVED] CPT121 Task 1.2.3 Practice Exercises - Strings, Input and Output

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon task_1_2_3-2sc731.zip (44.2 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

Task 1.2.3 Practice Exercises – Strings, Input and Output

  1. Write a program which reads in values for the user’s name, day, time, temperature (to one decimal place), weather conditions (eg. sunny, cloudy, rain, storms, etc) and rain in the past 25 hours (value in mm to one decimal place) and prints out this information in a neat, labelled and tabulated format (ie. all labels and values are aligned in columns).

The input values must be prompted for and read in the order specified and you may find the printf() method useful when printing your output.

  1. Write a program that will read the marks of three students as integer values using the Scanner class and display the following:
    1. average mark across the three students (to two decimal places)
    2. the maximum mark obtained
    3. the minimum mark obtained

Note that you may find methods in the Math class useful for points b) and c) of this task and it is not necessary to use decisions to identify the required values for these points.

  • task_1_2_3-2sc731.zip