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 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
