Question
Java Hotel Management -Keep a list of propertys rooms and room specifications (rates, beds)-Keep track of room reservations-Allow user to make reservations- Manage guest check-ins
Java
Hotel Management
-Keep a list of propertys rooms and room specifications (rates, beds)-Keep track of room reservations-Allow user to make reservations- Manage guest check-ins and check-outs, print bills-Print management reports (occupancy rate, list of rooms needing housekeeping)
Level 2 programming class so simple methods, classes, etc.
This is what I have so far.
public class HotelRooms {
private int roomNum;
private Main[] customer = new Main[30];
private double rate;
private String type;
private int roomStatus;// 1 is occupied, 0 is vacant
private int numRoomsSingle = 0;
private int numRoomsDouble = 0;
private int numRoomsSuite = 0;
public HotelRooms() {
}
public HotelRooms(int n, double r, String t, int s) {
roomNum = n;
rate = r;
type = t;
roomStatus = s;
}
public int getRoomNum() {
return roomNum;
}
public double getRate() {
return rate;
}
public String getType() {
return type;
}
public int getRoomStatus() {
return roomStatus;
}
public Main[] getCustomer() {
return customer;
}
public int getNumRoomsSingle() {
return numRoomsSingle;
}
public int getNumRoomsDouble() {
return numRoomsDouble;
}
public int getNumRoomsSuite() {
return numRoomsSuite;
}
public void setRate(double rate) {
if(type == "single") {
rate = 90.00;
numRoomsSingle--;
}
else if(type == "double") {
rate = 100.00;
numRoomsDouble--;
}
else if(type == "suite") {
rate = 120.00;
numRoomsSuite--;
}
}
public void setRoomStatus() {
if (roomStatus == 0) {
roomStatus = 1;
}
else {
roomStatus = 0;
}
}
public void setType(String t) {
type = t;
}
}
public class Main{
public static void main(String[]args ){
//TODO
}
}
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