program for cakes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tinku
    New Member
    • Jan 2007
    • 4

    #1

    program for cakes

    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
  • DeMan
    Top Contributor
    • Nov 2006
    • 1799

    #2
    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.....

    Comment

    • tinku
      New Member
      • Jan 2007
      • 4

      #3
      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.

      Comment

      • Ganon11
        Recognized Expert Specialist
        • Oct 2006
        • 3651

        #4
        Please refer to the following set of guidelines for posting:

        http://www.thescripts. com/forum/thread571397.ht ml

        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.ht ml

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by tinku
          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.

          Comment

          Working...