CSE 101 Programming Assignment 3 user interface for a course solution

$30.00

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (7 votes)

Overview: You will continue the program this week to maintain the grades for a student in a
course. Do not forget your headers with @author and @since information. This program will
be expanded in future weeks, so be sure you understand the concepts covered in this
program.
Requirements: Write a program that will simulate the user interface for a course. It will
take arrays as parameters for the grading information. Then will ask the teacher to enter
grade information, make grade changes, or display a grade.
To facilitate the execution of this program, you will write and modify (at minimum) the
following methods:
1. displayMenu(item, input)
a. A new method to display the options based on the contents of the array
b. Takes an array of strings and a Scanner object as parameters
c. Displays to the output each of the names in the array preceded by a
consecutive number ending with “0 – to checkout”
d. Requests an integer input from the user
e. Returns an Integer for the user’s choice
2. courseGrade(category, quantity, weight)
a. It will take three parameters
i. String array for names of the graded categories
1. For each item in this array it will change the name to
capitalize the first letter and lowercase other letters
ii. Integer array for number of each item
iii. Integer array for weight of each item
b. It will run according to the description above until the user types “0” for
the prompt.
c. NOTE: This method will use much of the main method from your previous
assignment
d. Returns None
3. capitalize(name)
a. For each value in the name array, format name with the first letter
uppercase; all other letters lowercase
b. Takes an array of Strings as a parameter
CSE 101 Programming Assignment 3 Page 2 of 4
CSE 101|Fall 2020 2
c. Returns none
d. Note: You can call your previous capitalize method from this method
using method overloading
4. validQuantity(quantity)
a. no change
5. validWeight(weight, totalWeight)
a. no change
6. gradeLetter(grade)
a. no change
7. gpaPoints(grade)
a. no change
8. status(grade)
a. no change
9. Any other methods you feel helpful can be implemented, however, these will be
the only methods tested.
Design:
When courseGrade is called with valid quantity and weight values, your program should
display the list of options to the teacher and ask what he/she would like to do. When the
teacher decides to enter all grades, the system should ask for values for all grades. If the
teacher asks to change a grade, the system should ask which grade to change, show the
current grade and get the new value. If the teacher asks to display the student grade, it
should calculate the student’s grade based on the values entered so far.
The example on the next page was executed using the following code:
Note: The code above was a main method used to execute the courseGrade program.
You are not required to have a main method. You are encouraged to use a main method
to test your courseGrade program. If you include a main method, it will not be used for
grading purposes.
CSE 101 Programming Assignment 3 Page 3 of 4
CSE 101|Fall 2020 3

Finally, entering 0 should exit the system and any invalid value should display an error
message and continue:

If a teacher enters an invalid choice for changing grades, display an error message and return
to the main menu:

CSE 101 Programming Assignment 3 Page 4 of 4
CSE 101|Fall 2020 4
If we pass invalid values in the arrays to the method, the system should display an error
message and exit:

Code: Create variables and arrays for the values entered by the user and assign using the
Scanner object. As a user enters valid values update the values of the variables and
arrays accordingly.
NOTE: The user will not enter category, quantity, and weight values. Those will be passed
to the method using arrays.
Test: You are responsible for testing your program. It is important to not rely solely on
the examples presented in this Project description.
Grading:
MS Teams Submission: If anything is ambiguous, it is your responsibility to ask questions. It
is also your responsibility to complete this assignment in a timely manner. E-mails with
questions regarding this assignment will likely not be answered if received after 17:00 on the
Friday before the due date of the assignment. You can submit multiple times, however, we
will only grade the last version that you submitted. Be sure to click the “Turn In” button.
Filename: You must name your java file according to the description above. If your file is not
named in this way, your submission for this assignment will not be accepted.
Quiz: There will be a quiz based on this assignment given on 31-December at 12:30. The
result of this quiz will be used to determine your grade on this assignment. Note: if you do
not submit the quiz, your score on this assignment will be 0.