File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ public class MyMain {
2+ public static void main (String [] args ) {
3+ Recepitionist recep1 = new Recepitionist ();
4+ boolean status = recep1 .checkRoomAvailability (3 );
5+ double bill = recep1 .generateBill ();
6+ recep1 .takeCustomerFeddback ();
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ public class Recepitionist {
2+ private int staffID ;
3+ private String name ;
4+ private String telephoneNumber ;
5+
6+ // Default Constructor
7+ public Recepitionist () {
8+ this .staffID = 0 ;
9+ this .name = "abc" ;
10+ this . telephoneNumber = null ;
11+ }
12+
13+ // Overloaded Constructor
14+ public Recepitionist (int pID , String pName , String pTelephoneNumber ) {
15+ this .staffID = pID ;
16+ this .name = pName ;
17+ this .telephoneNumber = pTelephoneNumber ;
18+ }
19+
20+ public Boolean checkRoomAvailability (int roomNumber ){
21+ return true ;
22+ }
23+ public double generateBill (){
24+ return 0 ;
25+ }
26+ public void takeCustomerFeddback () { }
27+ }
You can’t perform that action at this time.
0 commit comments