Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Task 5: Class and Object (40 marks) Write and execute a program in JAVA using switch .. case statement to calculate and display the

Java

image text in transcribed

Task 5: Class and Object (40 marks) Write and execute a program in JAVA using switch .. case statement to calculate and display the selling price and vehicle name of the selected vehicle code based on the following: Vehicle Code Corc Vehicle Name Base price Car 5000 Shipping charges 1000 Borb Bus 10000 1500 Morm Matador 7000 1200 Sors Scooter 3000 500 To determine the selling price, use the following formula: Selling price = Base price + Shipping charges + Dealer charge The Dealer charge will be 10% of the Base price Create class that hosts the main method and create one object. The created object should be used to call two methods and display appropriate messages. Note: student id should be appended to variables names compulsorily to avoid similarity Sample output ox. C:\Windows\system32\cmd.exe Enter your selection B You have selected a Bus Your total payment is 12500 Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago