Question
class booking { private String pack; private int departDate; private int returnDate; private int numOfPax; public booking () { } public booking (String pa, int
class booking { private String pack; private int departDate; private int returnDate; private int numOfPax; public booking () { } public booking (String pa, int dd, int rd, int nop) { pack = pa; departDate = dd; returnDate = rd; numOfPax = nop; } public void setData (String pa, int dd, int rd, int nop) { pack = pa; departDate = dd; returnDate = rd; numOfPax = nop; } public String getPack() { return pack; } public int getDepartDate() { return departDate; } public int getReturnDate() { return returnDate; } public int getNumOfPax() { return numOfPax; } }
From the class above, please insert the calculation process to calculate the booking for this booking class. Please write a new program and show your output.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started