100% Guaranteed Results


CS6308- Java Programming Solved
$ 29.99
Category:

Description

5/5 – (1 vote)

Assignment 2

Instructions:
• Use camel case for class name and variable name.
• Class name must follow your last 4 digit register number

1. Write a program to determine the custom grade of the marks given. If the marks go beyond 100 or lower than 0 then state the input is invalid.
90 to 100 : Grade O
80 TO 89 : Grade A+
70 TO 79 : Grade A
60 TO 69 : Grade B+
50 to 59 : Grade B
0 TO 49 : Grade U
Hint: use If statement
2. Write a program that simulates the coin toss as head or tail. Use Random number 0 0r 1 to determine the system input. The program should print the result as head if it one and tail if it is zero. Read the input from the user as a character ‘h’ or ‘t’ or ‘H’ or ‘T’ and tell the user whether he or she has predicted the coin toss correctly . Declare the result as Won the toss! Or lose!
(Hint: Use Random class to get the random input 0 to 1).

Hint: Use Switch statement

4. Write a program that verbalize the user inputs between 1 and 9999 number. For example
Input number : 852
Eight hundred and fifty two

5. Write a program to create 24-hour digital watch. Get the input from the user for the day(Mon, Tue, Wed, Thu, Fri, Sat, Sun) , hour (24-hour) , minute and seconds . The input of the user is valid then the digital clock should advance the input by one second and display the new day, hour, minute and second.
Sample input:
Input day : Mon
Input hour : 23
Input minute : 59
Input second : 59
Sample output
Tue 0 0 0
Hint: Use for statement

Reviews

There are no reviews yet.

Be the first to review “CS6308- Java Programming Solved”

Your email address will not be published. Required fields are marked *

Related products