Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CODING IN JAVA! HELP! Lab 5 Classes The following exercises are to be completed during lab class. If you do not have time to finish
CODING IN JAVA! HELP!
Lab 5 Classes The following exercises are to be completed during lab class. If you do not have time to finish during lab, they must be completed before the beginning of the following lab session. Set-Up Create a new project in your Eclipse workspace named: Lab05 In the sre folder, create a package named: edu.ilstu Part 1 Create test data and calculate the expected result. Input Radius Expected Results Diameter Area Circumference Implement the Circle class you designed for pre-lab. Write a program name CircleDriver that demonstrates the Circle class by asking the user for the circle's radius, creating a Circle object, and then reporting the circle's area, diameter, and circumference. 5 Sample Output Enter the radius of a circle: Area = 78.53975 Diameter - 10.0 Circumference - 31.4159 Part 2 Create test data and calculate the expected result. Input Percent Increase Expected Output Price Book Number Sold Life of Pi Harry Potter Life of Pi Harry Potter Implement the Book class you designed for pre-lab. Sales tax would be 7.5%. Create a Java program class named Book Driver that creates two Book objects. First object is for the book "Life of Pi" priced at $13.50 and the second is for the book "Harry Potter: Goblet of Fire" priced at $22.00. Sales program should ask the user for number sold for each book and display the resulting sales amount (note: sales amount should include sales tax) for each, properly labeled and indicating for which book. Then the program will ask the user for percentage increase in price for each book, and update the Book objects accordingly. Display the sales amounts (note: sales amount should include sales tax) again using the updated prices. All money amounts should be formatted with a dollar sign and two decimal places. Sample Output Enter number to buy of Life of Pi: 1 Cost for Life of Pi - $14.51 Enter number to buy of Harry Potter: 1 Cost for Harry Potter $23.65 Enter percent increase for Life of Pi (in decimal form): .05 Enter percent increase for Harry Potter (in decimal form): .05 Cost for Life of Pi = $15.24 Cost for Harry Potter - $24.83Step 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