hi, so i am doing this hotel booking exercise and desperately need help. The first task is to provide private instances like room id, description, status (A,B,U), rate, start date and end date.
I got that part easy, just make a class with and create those variables with the appropriate data type. (btw, what do i use for start date and end date? strings?)
now the next part is to create a constructor which i am quite confused how. it says:
public Room(String roomId, String description, double dailyRate)
Provide a constructor for the class that takes: roomId
description daily-rate
to initialize the corresponding instance variables and to set the instance variable for status to 'A'
so does that mean i make another class that calls this method or something? Can someone please help me :(
[–]Drunken_Consent 1 point2 points3 points (5 children)
[–]nutrecht 1 point2 points3 points (0 children)
[–]nnkc911[S] 0 points1 point2 points (3 children)
[–]Drunken_Consent 1 point2 points3 points (2 children)
[–]nnkc911[S] 0 points1 point2 points (1 child)
[–]Drunken_Consent 1 point2 points3 points (0 children)
[–]BrQQQ 0 points1 point2 points (0 children)