By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,034 Members | 822 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,034 IT Pros & Developers. It's quick & easy.

program for cakes

P: 4
Kate's Cakes
Scenario

Katherine Smith started a small business making specialist cakes for local restaurants and cafés which she delivers on Tuesdays and Fridays. Her business "Kate's Cakes" has done so well that Katherine has more orders than she can cope with and to deal with this new problem, she has enlisted local help.

Katherine has a list of 'helpers' who have agreed to bake cakes from a list of standard cakes that the business delivers when required. Any special orders which are not on the list are done by Katherine herself. Each helper has specified the maximum number of cakes they want to be given in any week and the system should not allocate more than that number.

Orders for cakes are given to Katherine at least a week in advance and come as an email in the form below:

From : Jakes Kitchen
To : Kate's Cakes

Cake Order For week 23.
Tues Fri
Coffee and Walnut 3 4
Victoria Sponge 2 1
Double Chocolate 2 3
Carrot Cake 1 1
Cherry Cake 3 1

Cakes are priced at £17.50 each, and helpers are paid £12.50 for each cake made. Katherine phones up the helpers to let them know what is required and collect the cakes when they are ready.

It has been proposed that a system be written to keep track of the various 'helpers' that the business uses, the cakes they bake and the money they earn. It will of course make sure that Katherine is busy baking up to 10 cakes per day before allocating cakes to the helpers.

There is NO requirement for a Graphical User Interface at this time.
You are NOT expected to create a completed system!!!






At this stage, you will not be concerned with the dynamic design. Instead, you have to implement and demonstrate at least the Cake, Helper and Schedule classes as follows:

The Cake class contains all the details of a single cake, who is baking it, who it is for and when it is due to be delivered

The Helper class contains the name, address and telephone number of the helper, the maximum number of cakes to be allocated each week and a list of the cake orders allocated at this time.

The Schedule class maintains a list of all cakes on order, all the helpers and the orders.

It is up to you to decide where in the system would be the most appropriate place to store the charges or payments made or if you need to include then at all in your demonstration.

You will have to create demonstration programs to illustrate all the classes you have created
Jan 10 '07 #1
Share this Question
Share on Google+
4 Replies


DeMan
100+
P: 1,806
Have you started?
where are you stuck?
do you have any ideas on starting?

I Suggest you focus on one class at a time (I'd start with the Cake).
It tells you what sort of attributes to give a cake object -the person baking, who for and when by so we can store all of these in the object. You can create accessor (eg getWhoMaking(), setWhoMaking()....) methods to easily access the data within the object if you need.
Consider what sort of Accessors you need, and whether it would be helpful to have a constructor that takes some/all of the attributes as inputs.
Consider also whether you need to store any other information in the class (eg price - although this appears to be constant for any cake so maybe not), but you may feel that some extra information is required.
Once the class is completed, you can create a simple test program that would create a testDriver that creates an instance (or several instances) of the Cake Class and tests whether the methods you have decided to implement work as desired.

I hope this helps you to make a start, post back if you need something clarified, or need help with the next section.

You'll probably find people are reluctant to give code without first seeing that you have attempted the problem though.....
Jan 10 '07 #2

P: 4
i am a begginer in java and have just started. wanted some input on the problem on cakes. probably the codes if possible.
i am trying on my own but will take more time.
Jan 10 '07 #3

Ganon11
Expert 2.5K+
P: 3,652
Please refer to the following set of guidelines for posting:

http://www.thescripts.com/forum/thread571397.html

You are asked to provide the work that you have so far. You must attempt the problem before we will 'give you the codes'. In fact, I hope no one will 'give you the codes', because they should be reading this thread on how to respond:

http://www.thescripts.com/forum/thread576876.html
Jan 10 '07 #4

10K+
P: 13,264
Kate's Cakes
Scenario

Katherine Smith started a small business making specialist cakes for local restaurants and cafés which she delivers on Tuesdays and Fridays. Her business "Kate's Cakes" has done so well that Katherine has more orders than she can cope with and to deal with this new problem, she has enlisted local help.

Katherine has a list of 'helpers' who have agreed to bake cakes from a list of standard cakes that the business delivers when required. Any special orders which are not on the list are done by Katherine herself. Each helper has specified the maximum number of cakes they want to be given in any week and the system should not allocate more than that number.

Orders for cakes are given to Katherine at least a week in advance and come as an email in the form below:

From : Jakes Kitchen
To : Kate's Cakes

Cake Order For week 23.
Tues Fri
Coffee and Walnut 3 4
Victoria Sponge 2 1
Double Chocolate 2 3
Carrot Cake 1 1
Cherry Cake 3 1

Cakes are priced at £17.50 each, and helpers are paid £12.50 for each cake made. Katherine phones up the helpers to let them know what is required and collect the cakes when they are ready.

It has been proposed that a system be written to keep track of the various 'helpers' that the business uses, the cakes they bake and the money they earn. It will of course make sure that Katherine is busy baking up to 10 cakes per day before allocating cakes to the helpers.

There is NO requirement for a Graphical User Interface at this time.
You are NOT expected to create a completed system!!!






At this stage, you will not be concerned with the dynamic design. Instead, you have to implement and demonstrate at least the Cake, Helper and Schedule classes as follows:

The Cake class contains all the details of a single cake, who is baking it, who it is for and when it is due to be delivered

The Helper class contains the name, address and telephone number of the helper, the maximum number of cakes to be allocated each week and a list of the cake orders allocated at this time.

The Schedule class maintains a list of all cakes on order, all the helpers and the orders.

It is up to you to decide where in the system would be the most appropriate place to store the charges or payments made or if you need to include then at all in your demonstration.

You will have to create demonstration programs to illustrate all the classes you have created
If you work through this program posting what you've done and asking for advice when you are stuck, by the time you finish this you will have understood a lot of Java concepts.
Jan 11 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.