Question: Write a program that translates a user-input String letter grade into a number grade. Letter grades are A, B, C, D, and F, possibly followed

Write a program that translates a user-input String letter grade into a number grade. Letter grades are A, B, C, D, and F, possibly followed by + or . Their numeric values are 4, 3, 2, 1, and 0. There is no F+ or F. A + increases the numeric value by 0.3, a decreases it by 0.3. However, an A+ has value 4.0. NOTE: Your implementation must include the definition/implementation and use/calling of method letterGradeToNumericGrade that is passed a String letter grade to its parameter variable, and returns the floating-point numeric grade. Sample Run (user input in color)

Enter a letter grade: B- The numeric value is 2.7.

Write a program that translates a user-input floating-point number between 0 and 4 into the closest letter grade. For example, the number 2.8 (which might have been the average of several grades) would be converted to B. Break ties in favor of the better grade; for example 2.85 should be a B. NOTE: Your implementation must include the definition/implementation and use/calling of the method numberGradeToLetterGrade that is passed a double numeric grade to its parameter variable, and returns the letter grade.

Write a program to simulate a bank transaction. There are two bank accounts: checking and savings. First, ask for the initial balances of the bank accounts; reject negative balances. Then ask for the account; options are checking and savings. Then ask for the transactions; options are deposit, withdrawal, and transfer. Then ask for the amount; reject transactions that overdraw an account. At the end, print the balances of both accounts. NOTE: Your implementation must include the definition/implementation and use/calling of the following methods:

getBalance: method is passed the account name (String) to its parameter variable. It prompts (e.g., "Enter the saving account balance: ") and gets the floating-point account balance as user input. Finally, it returns the user-input balance.

getTransaction: method is passed the account name (String) to its parameter variable. It prompts (e.g., "Enter the saving account transaction: ") and gets the transaction String as user input. Finally, it returns the user input as an int: 1 for "deposit", 2 for "withdrawal", 3 for "transfer".

getAmount: method is passed the account name (String) and the transaction (String) to its parameter variables. It prompts (e.g., "Enter the withdrawal amount for the checking account: ") and gets the floating-point transaction amount as user input. Finally, it returns the user-input transaction amount.

showBalance: method is passed the account name (String) and the (floating-point) account balance to its parameter variables. It outputs the account name as balance (e.g., "The checking account balance: $1,234.56").

A supermarket awards coupons depending on how much a customer spends on groceries. For example, if you spend $50, you will get a coupon worth eight percent of that amount. The following table shows the percent used to calculate the coupon awarded for different amounts spent. Write a program that calculates and prints the value of the coupon a person can receive based on groceries purchased.

Write a program that translates a user-input String letter grade into a

NOTE: Your implementation must include the definition/implementation and use/calling of the method calcCouponAmount, which is passed a floating-point purchase amount. It uses the above table to determine and return the coupon amount based on the purchase amount. Here is a sample run (user input in color):

Please enter the cost of your groceries: 14 You win a discount coupon of $1.12. (8% of your purchase)

For each project:

Use the Design Recipe to design the algorithm for each method (main and others), showing all work as comments in the source code (.java) file. This is worth 10 points per project.

Using Eclipse, implement the algorithm as a program. This is worth 15 points per project.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!