Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

help with making class diagrams please?

0 views
Skip to first unread message

Jay

unread,
May 2, 2005, 12:17:02 PM5/2/05
to
Hi, I'm revising for my exams and I found this past paper question asking to
make a class diagram for the system.

Here's the scenario:

Restaurant Table Reservation System

The system to be developed is intended to support day-to-day operations of a
large and popular restaurant by improving the process of making reservations
and allocating tables to customers. It will be a single-user system. The
restaurant currently operates a manual reservation system using hand-written
forms stored in a large folder.

The restaurant management has identified a number of problems with the
manual system. The system is slow and the reservation forms quickly become
difficult to read. This can lead to operational problem such as a customer
being prevented from making a reservation because it is not obvious from the
form that there is a table available. In addition, there is no back-up
system; if reservation forms get destroyed the restaurant has no record of
what reservations have been made for that evening.

For these reasons, the restaurant would like to develop an automated system
for managing reservations. The system should handle the process of making a
reservation in the following way. The system displays the interface and a
receptionist inputs a requested date for a reservation, the number of
'covers' or places reserved, a preferred location of the table
(smoking/non-smoking, window/non-window, etc). The system finds a table and
then displays the floor plan (the layout of the tables and their status,
available or reserved) for the specified date, indicating the selected
table, and prompts the receptionist to confirm the selection. The
receptionist has an option to change the table recommended by the system. In
both cases, the system marks the selected table as reserved. Only one
reservation per evening is accepted for each table.

If the customer intends to pay by cash or cheque a contact name and phone
number are recorded.

If the customer intends to pay by credit card then payment details are now
taken. If payment details are not valid, the reservation is not accepted.
The reservation may be cancelled up to 24 hours before the requested date
with no charge and the table becomes available for a new reservation. If a
party does not arrive (a no-show party), a penalty is charged.

The system would also be used by the Head Waiter to support operations of
the restaurant when it is open. The arrival of a party is recorded on the
system which marks the reserved table as occupied.

Unreserved tables are available to the general public on a first-come
first-served basis. In this case only the change of table availability is
noted on the system.
Assume that all functions are accessed through a single screen interface.


----- OK that's over with.

Now I'm not so great at doing these so can someone help me out.

The classes that I've got are Staff, customer, reservation, table. Is that
all right?

thank you very much


Remi Bastide

unread,
May 2, 2005, 12:27:13 PM5/2/05
to
"Jay" <nospam...@all.com> wrote:

>Hi, I'm revising for my exams and I found this past paper question asking to
>make a class diagram for the system.

Nice try ;-)

Jay

unread,
May 2, 2005, 12:31:00 PM5/2/05
to
"Remi Bastide" <FirstName...@irit.fr> wrote in message
news:86lc71ha8t743jrqf...@4ax.com...

Sure it might seem a bit suspect if it was at any time other than right
before exam time!

And I'm not asking for a model answer, tho that would be nice. It's jsut Im
having a hard time distinguishing what should be a class from what isn't
thats all.


Charles Krug

unread,
May 2, 2005, 2:46:06 PM5/2/05
to

Best thing to do is post how you envision the decomposition. You can
either use ASCII to approximate the UML or you can just list the objects
and their roles.

Your OP says, "here are the classes" but you don't state how you
envisioning them interacting.

Laurent Bossavit

unread,
May 2, 2005, 5:57:45 PM5/2/05
to
Jay,

Can you think of some test cases against which you might find it useful
to check your design ?

> The classes that I've got are Staff, customer, reservation, table. Is that
> all right?

They sound like a reasonable starting point. You'll want to consider
some follow-up questions.

For each one of these, can you think of three alternatives that could
possibly work ?

For each one of these, what are its responsibilities ? What does every
instance of each of these classes need to /know/, and what does any
instance need to be able to /do/ ?

Consider what you might be missing. The old system had the paper form.
The new system doesn't seem to have an equivalent. Might that be a
problem ? (Can you think of a test case that settles whether it is a
problem ?)

Consider failure modes. Imagine the system just went live, and the
restaurant owner is on the phone, raving mad. What might he be
complaining about ?

Lastly - this has nothing to do with the exam question, probably - but
I'd be rather teed off if a restaurant I was making a reservation with
asked me for credit card details, or charged me for not showing up.

Laurent

H. S. Lahman

unread,
May 2, 2005, 6:01:45 PM5/2/05
to
Responding to Jay...

> Hi, I'm revising for my exams and I found this past paper question asking to
> make a class diagram for the system.

I'll take this at face value that it is not the exam question itself.
It would be an abuse of this forum and unethical if it were.

Why Staff? The Receptionist and Head Waiter are users of the system.
Why do you feel they should be abstracted as part of the solution?
Basically they just initiate application actions. Has your course work
covered Transaction Processing? If so, note that several of the
activities described might be captured in different flavors of a
Transaction object.

How do you plan to handle dates? A Table can be reserved, occupied, or
vacant on different dates and times.

There are several activities (e.g., accepting a credit card and charging
a penalty for a no-show) that do not seem to be clearly related to any
of the classes you have identified so far. One test of the Class Model
is that all of the responsibilities necessary to the application have
been allocated to the logical entity. If there doesn't seem to be a fit,
it probably indicates there are other entities that need to be
abstracted from the problem space. (See comment on Transaction above.)


*************
There is nothing wrong with me that could
not be cured by a capful of Drano.

H. S. Lahman
h...@pathfindermda.com
Pathfinder Solutions -- Put MDA to Work
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
(888)OOA-PATH

Adam

unread,
May 5, 2005, 7:46:59 AM5/5/05
to
Payment is another class you will need. Don't think you need Staff as
your problem does not request users to logon, therefore staff are
outside the scope of the System.

0 new messages