Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

create another default class named VipPassenger which is a special type of Passenger. Its ticket price is 3 0 dollars cheaper than a regular passenger.

create another default class named VipPassenger which is a special type of Passenger. Its ticket price is 30 dollars cheaper than a regular passenger.
Tasks:
1. add a constructor.
Test cases:
VipPassenger vp1= new VipPassenger("aisle");
Passenger vp2= new VipPassenger("middle");
Passenger vp3= new VipPassenger ("aisle");
System.out.println(vp2.price);

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

T Sql Fundamentals

Authors: Itzik Ben Gan

4th Edition

0138102104, 978-0138102104

More Books

Students also viewed these Databases questions

Question

Add (9.2 x 103 s) + (8.3 x 104 s) + (0.008 x 106 x)

Answered: 1 week ago