HotelManagement.java
public class HotelManagement{
static Hotel createInitialHotel(){
Hotel obj = new Hotel();
obj.addRoom();
}
public static void main(){
Scanner sc=new Scanner(System.in);
System.out.println("Welcome to Holiday Inn Express");
System.out.println("Please make a selection from the following options:");
System.out.println("1. Make Reservation");
System.out.println("2. Cancel Reservation");
System.out.println("3. List Reservations");
System.out.println("4. List All Rooms");
System.out.println("5. Exit Program");
System.out.println("Selection:");
int selection = sc.nextInt();
switch(selection){
case 1: System.out.println("Enter the Guest Name");
String name =sc.nextInt();
System.out.println("Enter the size of the party");
int partySize = sc.nextInt();
System.out.println("Enter the Bed Type");
String BedType = sc.nextInt();
break;
case 2:
System.out.println("Enter the Guest Name");
String name =sc.nextInt();
if(){
}
break;
case 3:
case 4:
case 5: System.Exit();
default:
System.out.println("Wrong Selection");
}
}
}
Room.java
public class Room{
int roomNumber;
Guest currentOccupants;
BedType bedType;
public Room(int roomNumber, BedType bedType){
this.roomNumber=roomNumber;
this.currentOccupants=null;
this.bedType=bedType;
}
public boolean reserveRoom(Guest newGuest){
if(newGuest instanceof Guest){
return true;
}
return false;
}
void freeRoom(){
this.Guest=null;
}
boolean isAvailable(){
if(freeRoom())
return true;
else
return false;
}
String toString(){
}
getGuestType(){
currentOccupants.getName();
}
getPartySize(){
currentOccupants.getPartySize();
}
getRoomNumber(){
return roomNumber;
}
getBedType(){
return BedType;
}
setBedType(BedType bedType){
this.bedType=bedType;
}
}
Guest.java
import java.util.Arrays;
public class Guest{
String name;
int partySize;
Object[] items;
final int size;
public void Guest(String name, int partySize){
this.name=name;
this.partySize=partySize;
}
public Guest(Object... values){
this.size=values.length;
this.items=Arrays.copyOf(values,size);
}
public void getName(){
return name;
}
public void setName(String name){
this.name=name;
}
public void getPartySize(){
return partySize;
}
public void setPartySize(int partySize){
this.partySize=partySize;
}
@Override
public String toString(){
return Arrays.toString(items);
}
}
BedType.java
enum BedType(DOUBLE, QUEEN, KING){
DOUBLE=1;
QUEEN=2;
KING=3;
}
Hotel.java
public class Hotel{
int[] rooms;
int currentNoOfRooms;
int currentNumberOfReservations;
String hotelName;
public void Hotel(){
}
public void Hotel(String name, int maxNumberOfRooms){
}
void getName(){
}
void setName(){
}
void addRoom(Room newRoom){
}
boolean makeReservation(Guest newGuest, BedType desiredBedType){
}
boolean cancelReservation(String guestName){
}
void Room[] getRooms(){
}
void Room[] getReservations(){
}
}
There are a sotall of five classes and one enum required for this project. Over the...
Objective: To implement the programming languages features discussed in class and to develop a program that uses Graphical User Interfaces (GUI) that provides a friendly environment for users. Project Assignment Design and implement a Hotel Reservation System. The hotel has two types of rooms. One is regular room that has two beds. Another is deluxe room that has two beds and a safe. The regular room price is $120 per night. The deluxe room is $130 per night. A safe...
the first question java code eclipse app the second question is java fx gui caculator please fast 1. Create project called "YourFirstName_QUID'. Eg. Aliomar_202002345 2. Create two package Q1 and Q2. 3. Add your name and studentID as comments on the top of each Java source file you submit. Question 1. Bookings APP [80 Points-six parts] Implement the following hotel booking system. Use the following class diagram to understand the structure of the system's classes, their attributes operations (or methods),...
Project 3 Objective: The purpose of this lab project is to exposes you to using menus, selection writing precise functions and working with project leaders. Problem Specification: The PCCC Palace Hotel needs a program to compute and prints a statement of charges for customers. The software designer provided you with the included C++ source and you are asked to complete the code to make a working program using the given logic. The function main () should not change at all....
Round Tree Manor is a hotel that provides two types of rooms with three rental classes: Super Saver, Deluxe, and Business. The profit per night for each type of room and rental class is as follows: Rental Class Super Saver Deluxe Business Type I (Mountain View) $35 $40 - Room Type II (Street View) $25 $35 $45 Round Tree's management makes a forecast of the demand by rental class for each night in the future. A linear programming model developed...
Homework 3: Input Validation 1 Objectives control structures console-based user input using Scanner class writing complete programs using two classes: client and supplier 2 User Interface Specification This is a console-based I/O program. Display should go to System.out (print or println) and the program will get user input using the Scanner class. The flow of execution should be as follows: When the program starts, display a one-line introduction to the user Display a menu with 5 options 1. validate zip...
making a file You are tasked with creating a text-based program for storing data on Hotel Room Bookings - however, as this is a comparative languages course, you will be creating the same application in the following three programming languages: • Java, • Python, and • Lisp As you implement the application in each language you should keep notes on: - The features of the languages used, - Which features you found useful, and - Any issues or complications which...
Create four classes, Trainee, JumpingCalculator, JumpingTraining, and TrainProgLoader. Save them to Trainee.java, JumpingCalculator.java, JumpingTraining.java, and TrainProgLoader.java. Code the classes as specified as follows. Compile and run to test the program. Trainee Class: This class represents a trainee. Fields : A private int data field named id; A private String data field named name; o a private boolean data field named jumpTrain; o a private static int data field named numOfTrainee; Methods: A constructor that takes id and name as the...
Round Tree Manor is a hotel that provides two types of rooms with three rental classes: Super Saver, Deluxe, and Business. The profit per night for each type of room and rental class is as follows: Rental Class Super Saver Deluxe Business Room Type I (Mountain View) $35 $40 - Type II (Street View) $25 $35 $45 Round Tree's management makes a forecast of the demand by rental class for each night in the future. A linear programming model developed...
/*--------------------------------------------------------------------------- // AUTHOR: // SPECIFICATION: This program is for practicing the use of classes, constructors, // helper methods, and the this operator. // INSTRUCTIONS: Read the following code skeleton and add your own code // according to the comments //-------------------------------------------------------------------------*/ import java.util.Scanner; public class { public static void main(String[] args) { // Let's make two students using all two constructors // Write code to create a new student alice using constructor #1 //--> Student alice = // Write code to...
In this assignment, you will implement Address and Residence classes. Create a new java project. Part A Implementation details of Address class: Add and implement a class named Address according to specifications in the UML class diagram. Data fields: street, city, province and zipCode. Constructors: A no-arg constructor that creates a default Address. A constructor that creates an address with the specified street, city, state, and zipCode Getters and setters for all the class fields. toString() to print out all...