Question: Write a JAVA Program (10 x1 = 10) 1. OmanAir wants to give concession on the ticket fare. Every ticket has National ID of Passenger,

 Write a JAVA Program (10 x1 = 10) 1. OmanAir wants

Write a JAVA Program (10 x1 = 10) 1. OmanAir wants to give concession on the ticket fare. Every ticket has National ID of Passenger, Passenger Name and Ticket Fare. They decided to calculate the concession based on the below condition. Condition Ticket fare more than 100 otherwise Concession 5% of Ticket Amount No Concession In creating the program, consider the following requirements: 1. Create a java class Ticket and do the following: Declare the member variables such as National ID, Passenger Name and Ticket Fare. Create its Constructor, Mutator, Accessor and toString methods. Create a method called "caleConcession" to calculate the concession amount based on the given table. II. Create another java class with main method and also add the following in the class. Create object for Ticket class. Read necessary input values and initialize the object using Constructor. Using debugging method, display the National ID, Passenger Name, Ticket Fare and Concession Amount

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!