Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part a. Create a class called Lab1a.java (Eclipse will add the .java). Your class should solve the following scenario: Pat is a college student. Currently,
Part a. Create a class called Lab1a.java (Eclipse will add the .java). Your class should solve the following scenario: Pat is a college student. Currently, Pat is enrolled in History 101, which has a total of 1500 points possible for the semester. So far there have been 950 points, of which Pat has earned 786. Pat wants to know how many points needed to earn an A, B, C and D. The instructor follows a 90%=A,80%=B,70%=C,60%=D grading cutoff scale. Using these figures, calculate and display the following. USE VARIABLES APPROPRIATLY FOR VALUES. Pat has earned xxx points out of xxx points possible so far. Current percentage earned is xxxx% Current grade is X There are xxx points remaining. To earn this grade, Pat needs to earn this many points (of the remaining) \begin{tabular}{ll} A & xxxx \\ B & xxx \\ C & xxxx \\ D & xxxx \\ \hline \end{tabular} You will need to figure out the calculations on your own. Figure out how many points are required for the A for the semester, etc, and use that to figure out how many points he still needs to earn. Part b. Create a class called Lab1b.java (Eclipse will add the .java) Your user is purchasing plants for their front yard from Java Nursery. You know they want Japanese Maple trees that costs $479.99. They also want some azaleas that are $27.99 each. Have the user enter the number of shrubs they want to purchase and the number of Japanese Maples. You need to calculate how much they owe. Java Nursery offers the following discounts: - If the user buys more than 10 of a particular plant, they receive a 10% quantity discount. This is applied to the price for each plant. - If the subtotal is more than $1000, the user gets a 7.5% discount on their subtotal. This is applied to the subtotal, before sales tax is calculated. Sales tax is 9.8%. Then produce a display like shown below. Name variables appropriately. Use variables appropriately. ALL calculations should be done in your program. Set variables to avoid "magic numbers
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started