Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

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_2

Step: 3

blur-text-image_3

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

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions