Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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. 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!

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91718931

Have any Question?


Related Questions in Computer Engineering

In a standard s - t maximum flow problem we assume edges

In a standard s - t maximum flow problem, we assume edges have capacities, and there is no limit on how much flow is allowed to flow through a node. In this problem, we consider the variant of the maximum flow and minimu ...

Command to move all the sh files from current folder to

Command to move all the .sh files from current folder to parent directory. (single line Unix)

Question what system design methodologies and techniques

Question : What system design methodologies and techniques will you use? What potential risks do you see that may prevent successful completion of your solution design? The response must be typed, single spaced, must be ...

Solve the problem by implementing the whole class with main

Solve the problem by implementing the whole class with main() function and demonstrate that your Java code can pass several appropriate test cases successfully in your main() function? Write a short recursive Java method ...

Analyse two of the three technologies provided focus

Analyse two of the three technologies provided (focus virtualisation, cloud computing and green computing). Summarise what each of your two selected technologies is, and what the technology does. Explain what improvement ...

Can someone please code this simple background subtraction

can someone please code this simple background subtraction but with height and width ratio to detect a human being. Please! I so badly need it for my dissertation,, cant make a loop that would subtract the every frame fr ...

Question research different information systems management

Question : Research different information systems management disaster response plans of major organizations that have had to respond to fairly recent disasters. Discuss the results of the organization's recovery efforts.

Question provide a real-world example or describe a

Question: Provide a real-world example or describe a hypothetical situation in which a legitimate organization used spam in an effective and nonintrusive manner to promote a product or service. Need 300-350 words APA sta ...

Represent each of the following values in the ieee 754

Represent each of the following values in the IEEE 754 32-bit format, truncating inexact values. Indicate the percent error of the value stored compared to the exact value. This will require you to convert the 32 bit flo ...

Number of cars average trvel time between a and b using

Number of cars Average trvel time between A and B using route 1 1 10 2 10 3 10 4 11 5 12 6 14 7 18 8 24 Alternative route 2: average travel time is 18 minutes(no matter how many cars are using it) How many cars will take ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As