Reference no: EM131003182
This Extra Credit assignment builds on the Grade Stars app done in week 7. It adds looping to the application so that a grade can be continually input until the user signals that they want to quit. Aside from the requirements from the Grade Stars assignment, these are additional and clarified requirements:
1. The prompt for input asks for a letter grade from A to F (inclusive), with the additional wording, "or press Enter with no input to quit."
2. Only single grade letters, upper or lower case, are considered valid. Input exceeding a single character is invalid and should cause an Error JOptionPane dialog, complete with the appropriate icon and title of "Error" at the top of the window. (Note: this does not change default input and output from using a Scanner, only the error message. Do not do this in your real apps, i.e., mixing output modes.)
o Use the trim() method on the input so leading/trailing whitespace is removed, e.g., an input of " B" should still be considered valid.
3. An empty input string causes the loop and program to exit, otherwise it outputs the number of stars for the grade, or error message, and then re-prompts for the next letter grade.
4. The program must exit at the bottom of main, not from within the loop.
5. Please insure your indentation of original code/logic is correct and clearly shows as being within a looping structure!
You can base this V2 app on your own code (recommended) or use the posted solution if you wish. Anyone can submit for this extra credit, regardless of score on Grade Stars.
Here is some short pseudocode of one way to look at this.
prompt for grade input
while grade input length > 0
do Grade Stars V1 (+ check for input length == 1 and error message enhancement)
prompt for grade input
endwhile
Name this program/class GradeStarsV2<XW>. Submit just the single .java file to this dropbox. You may make as many submissions as you like, but I will only grade the last submission after the assignment Due Date. There will not be any feedback given on this prior to assessment for the grade, so make sure to read and understand the requirements clearly. If there are any questions, please post them in the Assignments forum!
Which is the marketing strategy we will use
: Business definition: My section of the paper is below and need only to be a page and 1/2 at the maximum. Which is the Marketing Strategy we will use. Who do you want to serve and why? Be sure to include customers/segments to be targeted and custom..
|
How many opt for none of the three subjects
: In a class of 120 students numbered 1 to 120, all even numbered students opt for Physics, whose numbers are divisible by 5 opt for Chemistry and those whose numbers are divisible by 7 opt for Math. How many opt for none of the three subjects?
|
What is your takeaway from the article
: rovide responses to the following reflective questions: What is your takeaway from the article? Why did this interview resonate with you personally? How can you apply what you have learned from the article to your professional and personal life in t..
|
What ticket price would make it a fair game
: What ticket price (rounded to two decimal places) would make it a fair game? Would you choose to play the game? In complete sentences, explain why or why not.
|
Prepare grade stars
: Only single grade letters, upper or lower case, are considered valid. Input exceeding a single character is invalid and should cause an Error JOptionPane dialog, complete with the appropriate icon and title of "Error" at the top of the window. (No..
|
Determine methods for overcoming these hindrances
: Identify a message in advertising. Describe how you perceive the message of the advertisement. Try to determine the reality of the advertisement. Distinguish between your perception and the reality of the message.
|
How is mobile banking changing consumer behavior
: How is mobile banking changing consumer behavior? What are the implications of this changing behavior in the future of banking
|
Outcomes based on an analysis of causal factors
: In the past two decades, public health professionals have launched a variety of interventions designed to improve the health of low-income urban populations.
|
Discuss ways you might measure the future effects
: Evaluate your OPM500 class work during the session and explain ways you could have performed better - identify topics you did not understand or successfully implement and, if possible, suggest how to improve the course material on those topics.
|