Computer Science, asked by ivanbhargava, 4 months ago

Define a class in java TravelPlan with the following descriptions: 5
Private members:
PlanCode of type long
Place String
Number_of_travellers of type integer
Number_of_buses of type integer
Public Members:
A constructor to assign initial values of PlanCode as 1001, Place as “Agra”,
Number_of_travellers as 5, Number_of_buses as 1.
A function NewPlan() which allows user to enter PlanCode,Place and Number_of_travellers.


Also,assign the value of Number_of_buses as per the following conditions:

Number_of_travellers Number_of_buses

Less than 20 1
Equal to or more than 20 and less than 40 2
Equal to 40 or more than 40 3

A function ShowPlan() to display the content of all the data members on screen

Answers

Answered by Swastik464748
0

Answer:

hhfMfddmgdfsfs

ngsjgd gkjtesjrsjfgdncxmgdtksjz

Similar questions