All the program code java source code should be zipped and submitted via Blackboard.
Problem 1: Write a program that produces the following output using nested for loop.
Problem 2: Write a program that converts date formats from American Format: “September 3, 2020” to International Format; - such as “2020-September-3”.
Hint: you may use several string methods, including: str.indexOf(c) and str.substring(p, q).
Problem 3: Implement a method called getGrade that accepts an integer representing a student’s grade in a course and returns that student’s numerical course grade. Write a main to test the implemented method. The grade can be between 0.0 (failing) and 4.0 (perfect). Assume that scores are in the range of 0 to 100 and grades are based on the following scale:
Score Grade
<60 0.0
60-62 0.7
63 0.8
64 0.9
65 1.0
…
92 3.7
93 3.8
94 3.9
=95 4
Problem 4: Write a program that prompts the user to input an integer and then outputs both individual digits of the number and the sum of the digit. For example, the program shall output the individual digits of 3456 as 3 4 5 6; output the individual digits of 8040 as 8 0 4 0; output individual digits of 4000 as 4 0 0 0; output individual digits of -2345 as 2 3 4 5.
Bonus Problem
Write a program that reads in a set of positive integers and outputs how many times a particular number appears in the list. You may assume that the data set has at most 100 numbers and -999 marks the end of the input data. The numbers must be output in increasing order. For example, for the data
15 40 28 62 95 15 28 13 62 65 48 95 65 62 65 95 95 -999
The output is
Number Count
13 1
15 2
28 2
40 1
48 1
62 3
65 3
95 4
Sample Solution