Google Answers Logo
View Question
 
Q: Visual c++ program problem ( No Answer,   0 Comments )
Question  
Subject: Visual c++ program problem
Category: Computers > Programming
Asked by: purplepit-ga
List Price: $40.00
Posted: 14 May 2003 03:46 PDT
Expires: 15 May 2003 01:51 PDT
Question ID: 203529
Can you please help write a short program(cpp) format for visual c++
to conform with the following question.
*******************************************************************************

The BSE Butchery Store is struggling to cope with the hoards of
customers eager to purchase its tasty pies. BSE management has decided
that customers will register by name (first name only) on arrival.
They will also be asked to say how much they guarantee to spend (this
will be a float in pounds and pence). Customers will be served on the
basis of the amount they guarantee to spend, thus ensuring that
high-spending customers will jump to the front of the queue, whilst
poor lecturers and students may wait all day. You are commissioned to
write the software. BSE specifies that you will use STL classes, and
that a priority queue will be used to store the customer queue. As a
regular customer yourself of BSE you decide to build into the ordering
algorithm a fix so that when your name is entered it always jumps to
the front of the queue. You justify this on the moral grounds that any
company prepared to pander to the rich deserves to be tricked.

For Part 2 write and test a program which at least does the following:

·       Defines a data structure (as a simple struct ) to represent a
customer (name and guaranteed spend).

·       Allows customers to be entered into a priority queue based on
the above rule (you need to define the ordering function in a similar
way to that given above)

·       Displays the waiting queue of customers, showing their name
and guaranteed spending amount.

For Part 3 Incorporate the above into a simple menu-based program to
organise the orderly management of customers. A sample menu could be:

BSE Butchery Store Menu

Add New customer 1

Serve customer 2

Display Queue size 3

Display queue 4

Quit 5

When a new customer arrives, their name is entered together with the
amount they guarantee to spend. They are entered into the queue (at
the appropriate position).

When a customer is served, a simple message is displayed giving the
name of the customer to be served (which is removed from the queue).
If option 2 is chosen when the queue is empty a simple message is
displayed.

The action of options 3 and 4 should be obvious. For option 4, you
will need to write a display function (very similar to the one given
in the notes). Make sure it prints in the right order (first name to
be printed is the front of the queue). You will of course need to
define a (simple) class to represent the data concept customer (name
and minimum spend).

*******************************************************************************

I do need this urgently if you can help......

Request for Question Clarification by answerguru-ga on 14 May 2003 11:29 PDT
Hi purplepit-ga,

This is quite a bit of work - I would be willing to do it for $100 if
no other researchers are interested. Please let me know :)

answerguru-ga

Clarification of Question by purplepit-ga on 14 May 2003 12:57 PDT
Hi Would you be able to do just the part 2, for $60.00 by tomorrow?
Thanks
purplepit-ga

Request for Question Clarification by answerguru-ga on 14 May 2003 13:10 PDT
Hi again,

Actually I don't think I will be able to - I am going to withdraw my
other offer as well. Hopefully another researcher is willing to take
this on :)

answerguru-ga
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy