Overview of classes in the hotel management system

zhaozj2021-02-16  56

(The title of this one will be changed to the "Overview of the object in the hotel management system", but found that Allen Holub also used Class as the name of the design, so the original title is retained)

In the previous one, Allen Holub's definition of Allen Holub is this development document enters a long presented journey, but I am in the Allen Holub's "building user interfaces for object-oriented systems". This is designed about an example. Allen Holub's OO analysis of ATM:

Allen Holub mentioned that the first step in OO design is to make a simple explanation of the main part of the problem. Perhaps (or affirm) this is the definition of the content that I mentioned in the Chapter Chapter Chapter "Instruction System Problem". But now it seems that our definition is not enough, and now make the following changes:

First of all, I think this system can not be described in only one main problem and should be divided into seven: booking room, renting room, settlement, reservation, alternate bookings and query processing. And these seven questions are the 7 use cases mentioned above (many people think that I have been very insufficient in the previous section, I think so, so I spent some time to read Alistair Cockburn " Patterns for Effective Use Cases "and" Writing Effective Use Cases "in English original, I think it is necessary to write a use case document. But Alistair Cockburn mentioned that in some smaller systems, you can simplify the writing of the use case. Process, the purpose of using mode writing cases is to make the system's rehabilitation and maintenance, making other people in the development process - non-use case writing people more easily understand the problem to be solved by the system. So I decided to rewrite the case This section, but a simple re-outline here.). Now I re-describe these 7 questions here: 1, booking room: a customer calls or otherwise telling the hotel service staff to book a room and scheduled information (standard, check-in time and number of days should include check-in, etc.), hotel The service personnel queries whether there is a qualified room from the room information, and tell the customer if it is scheduled to succeed. 2, rental room: Customer tells the hotel service staff asks for renting rooms and provides rental information (more than booking information), the hotel service personnel are in accordance with the room information provided by the customer in the room information in the room information, and tells the customer. Rent room, record the rental information. 3. Extend rental room: should also be a rental room (temporary). 4, settlement: Customer proposes settlement, the hotel service staff receives the rental fee based on the rent information, customer payment, service personnel to settle. 5, release the reservation: Customers tell the hotel's service personnel (name, etc.), the service personnel find out the reservation, implement the reservation. 6, candidate reservation: Book a room condition and the room has been rented or reserved, and if the house is idle before leaseing time, the reservation is automatically implemented (this state checks this state at a fixed time). 7. Query room rental situation: Managers query the leased information based on query conditions (should be part or all of the rental information) to find the rental information.

From the above problem description, I summarize the following and their features.

1. Room information: Manage room information, inquiry service staff. 2. Book information: Manage customer name, room type, lease time and other information. Provide the hotel service staff to achieve a reservation room. 3, rent information: Manage customer names (contents of more information), room type, lease time, etc. Provided to the hotel service staff. 4. Inns service staff: Inquiry, reservation, alternate reservation, renting room, redeal, checkout, based on customer requirements (scheduled information, rental information). 5. Managers: query booking and rental information. 6, inquiry information: Provided to managers. Among them, there are classes that shop service personnel and managers should belong to the client, while others belong to the class of the server. (The predetermined information, lease information, and query information should exist in the form of an interface)

The following uses the class summarized (where room information, etc.) is based on the type of instantiated objects defined above, and the problem we want to solve: 1, booking room: Inns service staff issues to the room information The request, the room information is replied, and if the answer is YES, you enter the predetermined information provided by the customer. If there is no notification customer, there is no above room, whether it is alternate. If the customer wants candidate reservations, the candidate is scheduled (the same is basically the same as the subscription room, and the time is indicated when entering information). 2, rental room: The hotel service personnel issues the request for the room with the requirements, the room information is answered yes or no, if the answer is YES, enters the customer's rental information, if the answer is NO, rental failure. 3. Extension: That. 4, settlement: The hotel staff identies the rental information according to the information provided by customers (customer name, room number, etc.), and the rental fee is obtained according to the lease information, charge the fee, and the room rental status is released. 5. Release the reservation: The hotel service personnel find the predetermined information according to the information provided by the customer (customer name, etc.) to unpack the predetermined state. 6, candidate reservation: (see a reservation room). 7. Query the room rental situation: Managers query according to the query information.

The following should be noted: The system should automatically update the daily fixed time, as described below: 1. Automatic query has an expired predetermined information, if there is, it is automatically released. 2. Automatic query has an expired lease information, if there is, inform the hotel service personnel, inform the customer (in the real world) to achieve settlement or extension. 3. Automatic querying whether there is a candidate predetermined room to be converted into a predetermined, if there is a notification of the hotel service personnel, inform the customer (in the real world), if the customer agrees to book, make a subscription room.

The above class seems to address the problems we mentioned in the hotel management system, but they still can't afford to scrutinize, such as: Inquiries in the case of the room for query, if it is for rent information or booking Information, the two information should be a collection of information, not a single message, and the two information in the problem of renting rooms and booking rooms should be a single message. So I am not satisfied with the definition of the above-mentioned classes described above, I believe there is more doubts, I hope to get more people's corrects.

to be continued

Copyright: IDILENT website reproduced please indicate the author's other reprint, please contact the author (iDilent@yahoo.com.cn).

转载请注明原文地址:https://www.9cbs.com/read-24371.html

New Post(0)