Project Outcomes:
Develop a python program that uses:
decision constructs
looping constructs
basic operations on an list of objects (find, change, access all
elements)
more than one class and has multiple objects
Project Requirements:
1. Develop a simple Hotel program. We will have two classes, a
Hotel class
representing an individual hotel and a Room class. The Hotel class
will contain several
Room objects and will have several operations. We will also have a
driver program to test
the Hotel class.
2. Build a Hotel class that will store information about a Hotel.
It will include a name and
location. It should also include a list of class Room to hold
information about each
room. It will also have a int called occupiedCnt that keeps track
of how many rooms in
the hotel are occupied.
Specific Requirements for the Hotel Class:
1. The Hotel class has two constructors
1. __init__ function, will read in the hotel name and location from
hard-coded
values in the tester class, such as Beach Marriot Pensacola, it
will also assign
numOfRooms to zero. numOfRooms indicates how many rooms
are in the hotel.
It will create a 10 element array.
2. The Hotel will have an addRoom method that will create each
room with the required
information: room number, bed type, smoking/non-smoking, and the
room rate. Create at
least 5 rooms with different characteristics. Each room will also
have a boolean field
called occupied attribute that will be set to false when the room
is created. Don't forget
to increment the numOfRooms instance variable. Example
values for the rooms are:
101 queen s 100
102 king n 110
103 king n 88
104 twin s 100
105 queen n 99
3. The UML class diagram for the Hotel class will look like
this:
Hotel
theRooms: Array Room[]
name: String
location: String
occupiedCnt: int
numOfRooms: int
def __init(self)__(String,String)
def isFull(self) : boolean
def isEmpty(self) : boolean
def addRoom(self ,roomnumber,bedtype,smoking,price)
def addReservation(self,occupantName ,smoking,
bedtype)
def cancelReservation(self,occupantName)
def findReservation(self,occupantName):
def printReservationList(self)
def getDailySales(self) :
def occupancyPercentage(self) :
Setters and getters methods for name and location.
4. isFull() – returns a boolean that is true if all the rooms in
the hotel are occupied.
5. isEmpty() – returns a boolean that is true if all the rooms in
the hotel are unoccupied.
6. The addReservation() method takes three parameters: the
occupant’s name
(String), smoking or non-smoking request (char), and the requested
bed type (String).
When this method is called, the hotel will search the list of its
rooms for one that matches
the bed type and smoking/non-smoking attributes. If an unoccupied
room with the correct
attributes is found, the renter's name will be set and the
occupied attribute will be set
to true. In either case a message will be printed that will state
whether or not the
reservation was made.
7. When the cancelReservation() method executes, the hotel will
search for the
name of the visitor in each room. If it is found, the occupied
attribute will be set to false.
In either case a message will state whether or not the reservation
was cancelled. This
method calls the private utility method findReservation()to scan
the list of rooms
looking for a guest by name. It will return the index of the room
in the Array of rooms
or NOT_FOUND if the room is not found, which will be declared
as:
NOT_FOUND = -1;
8. findReservation() will take in a String representing the
occupant’s name and
search the occupied rooms for a reservation with that person’s
name. It will return the
index of the room or NOT_FOUND if not found.
9. printReservationList() will scan through all the rooms and
display all details
for only those rooms that are occupied. For example:
Room Number: 102
Occupant name: Pinto
Smoking room: n
Bed Type: king
Rate: 110.0
Room Number: 103
Occupant name: Wilson
Smoking room: n
Bed Type: king
Rate: 88.0
10. getDailySales() will scan the room list, adding up the dollar
amounts of the room
rates of all occupied rooms only.
11. occupancyPercentage() will divide occupiedCnt by the total
number of rooms to
provide an occupancy percentage.
12. __str__ – returns a nicely formatted string giving hotel and
room details (by calling
the __str__ in the Room class) for all the rooms in the hotel. For
example:
Hotel Name : Beach Marriot
Number of Rooms : 5
Number of Occupied Rooms : 1
Room Details are:
Room Number: 101
Occupant name: Not Occupied
Smoking room: s
Bed Type: queen
Rate: 100.0
Room Number: 102
Occupant name: Coffey
Smoking room: n
Bed Type: king
Rate: 110.0
Room Number: 103
Occupant name: Wilson
Smoking room: n
Bed Type: king
Rate: 88.0
Room Number: 104
Occupant name: Not Occupied
Smoking room: s
Bed Type: twin
Rate: 100.0
Room Number: 105
Occupant name: Not Occupied
Smoking room: n
Bed Type: queen
Rate: 99.0
13. The Room class diagram will look like this:
Room
roomNum: int
bedType: String
rate: double
occupantName: String
smoking: char
occupied: boolean
def __init__(int,String,char,double)
def getBedType(): String
def getSmoking():
char
def getRoomNum(): int
def getRoomRate(): double
def getOccupant(): String
def setOccupied(boolean)
def setOccupant(String)
def setRoomNum(int)
def setBedType(String)
def setRate(double)
def setSmoking(char)
def isOccupied(): boolean
1. The __init__() for a Room takes an int (room number), String
(bed type), char (s or n for
smoking or non-smoking)), and a double (room rate).
2. isOccupied() method returns true if the room is occupied, false
otherwise.
3. __str__() provides all the details of a room - room number,
name of guest(if
occupied) , bed type, smoking/non-smoking, rental rate. This should
all be formatted
nicely with one attribute on each line using the
'\n' escape character. See example above.
4. Several accessor and mutator methods for the Room class.
# Use list to store the room details.
You have to store required data in the list/database. You can store
hotel name, address, and
all rooms. Customer data in database tables.
In: Computer Science
1. The Public Good Problem A national park that costs MC = 80 dollars to provide to society has been privatized and handed over to a private firm; the firm is mandated to price at marginal cost. There are two types of consumers, a group of high demand consumers (group A) that have an aggregate demand function equal to MB = 100 – Q, and a low demand group of consumers (group B) with aggregate demand equal to MB = 50 – Q, where Q is thousands of acres.
A. How many acres will be provided by the firm when pricing at MC, assuming that the low-demand group will free-ride on the high-demand group?
B. What is the aggregate demand curve for the national park? (Hint: the aggregate demand curve for a public good is the vertical aggregation of the individual demand curves.)
C. Calculate the aggregate consumer surplus for the two types of consumers when the firm prices at MC. (Hint: in this case, the group B is free riding, and they can gain extra consumer surplus)
D. If the national park is provided by the government, how many acres SHOULD be provided?
In: Economics
A national park that costs MC = 80 dollars to provide to society has been
privatized and handed over to a private firm; the firm is mandated to price at
marginal cost. There are two types of consumers, a group of high demand
consumers (group A) that have an aggregate demand function equal to MB = 100 –
Q, and a low demand group of consumers (group B) with aggregate demand equal to
MB = 50 – Q, where Q is thousands of acres.
In: Economics
1) COVID 19 has made a significant impact on the provision of
hospitality guest service. As a hospitality manager who is forced
to adapt to the new social constructs, how can you sustain the
quality of hospitality guest service to minimize physical contact?
Justify your answer.
2). Reflecting on the nature or the characteristics of service,
what do you think are its implications to the hospitality
organizations in creating a total guest experience?
3) The service industry holds to the general notion that “the guest
is always right.” However, in situations where the guest wants too
much or goes too far, as rule of thumb, the hospitality manager
must be able to find ways to let them know that they are wrong with
dignity ensuring that in the process their self- esteem as well as
their satisfaction with the guest experience and the organization
are not negatively affected. So, how would you handle the given
situation? A long-time guest has drunk a bit too much in your hotel
bar. He is staying at the hotel that evening, he is not driving,
and he insists on one more drink. He says that if the hotel refuses
to serve him, he will take his business elsewhere.
In: Operations Management
1-As a hotel owner what are the advantages and disadvantages of using a management company?
2-What are the issues GM's must address when operating a hotel for a management company?
In: Operations Management
Using High-Low to Calculate Predicted Total Variable Cost and Total Cost for Budgeted Output
Speedy Pete’s is a small start-up company that delivers high-end coffee drinks to large metropolitan office buildings via a cutting-edge motorized coffee cart to compete with other premium coffee shops. Data for the past 8 months were collected as follows:
| Month | Delivery Cost | Number of Deliveries |
| May | $63,450 | 1,800 |
| June | 67,120 | 2,010 |
| July | 66,990 | 2,175 |
| August | 68,020 | 2,200 |
| September | 73,400 | 2,550 |
| October | 72,850 | 2,630 |
| November | 75,450 | 2,800 |
| December | 73,300 | 2,725 |
Assume that this information was used to construct the following formula for monthly delivery cost.
| Total Delivery Cost = $41,850 + ($12.00 × Number of Deliveries) |
Required:
Assume that 3,000 deliveries are budgeted for the following month of January. Use the total delivery cost formula for the following calculations:
1. Calculate total variable delivery cost for
January.
$
2. Calculate total delivery cost for
January.
$
Feedback
1. Total Variable Delivery Cost = Variable Rate × Number of Deliveries
2. Total Delivery Cost = Fixed Cost + (Variable Rate × Number of Deliveries)
In: Accounting
1. The long run average total cost shows what happens to average (per unit) total cost as a firm grows in size (adds more capital or increases its plant size). True or false?
2. In the short run, at least one input is variable and one input is fixed. True or false?
3. If marginal product is less than average product, average product must be falling. True or false?
4. In the long run, all inputs are variable. True or false?
In: Economics
In: Economics
Using High-Low to Calculate Predicted Total Variable Cost and Total Cost for Budgeted Output Pizza Vesuvio makes specialty pizzas. Data for the past 8 months were collected: Month Labor Cost Employee Hours January $6,800 420 February $9,699 610 March $7,940 710 April $9,587 670 May $8,290 540 June $7,331 410 July $9,290 630 August $7,250 370 Assume that this information was used to construct the following formula for monthly labor cost. Total Labor Cost = $6499 + ($2.03 x Employee Hours) Required: Assume that 665 employee hours are budgeted for the month of September. Use the total labor cost formula for the following calculations: 1. Calculate total variable labor cost for September. Round your answer to nearest whole number.
In: Accounting
how much should I invest, and what should be the total fixed cost,total variable cost, expected revenue and pay back period for my start-up on onlin gaming?
In: Finance