项目作者: Adhouma

项目描述 :
Java OOP-master-challenge
高级语言: Java
项目地址: git://github.com/Adhouma/OOP-master-challenge.git
创建时间: 2020-08-19T13:53:50Z
项目社区:https://github.com/Adhouma/OOP-master-challenge

开源协议:

下载


OOP-master-challenge

  1. /**
  2. * The purpose of the application is to help a fictitious company called Bills Burgers to manage
  3. * their process of selling hamburgers.
  4. * Our application will help Bill to select types of burgers, some of the additional items (additions) to
  5. * be added to the burgers and pricing.
  6. * We want to create a base hamburger, but also two other types of hamburgers that are popular ones in Bills store.
  7. * The basic hamburger should have the following items.
  8. * Bread roll type, meat and up to 4 additional additions (things like lettuce, tomato, carrot, etc) that
  9. * the customer can select to be added to the burger.
  10. * Each one of these items gets charged an additional price so you need some way to track how many items got added
  11. * and to calculate the final price (base burger with all the additions).
  12. * This burger has a base price and the additions are all separately priced (up to 4 additions, see above).
  13. * Create a Hamburger class to deal with all the above.
  14. * The constructor should only include the roll type, meat and price, can also include name of burger or you
  15. * can use a setter.
  16. *
  17. * Also create two extra varieties of Hamburgers (subclasses) to cater for
  18. * a) Healthy burger (on a brown rye bread roll), plus two addition items that can be added.
  19. * The healthy burger can have 6 items (Additions) in total.
  20. * hint: you probably want to process the two additional items in this new class (subclass of Hamburger),
  21. * not the base class (Hamburger), since the two additions are only appropriate for this new class
  22. * (in other words new burger type).
  23. * hint: You have to find a way to automatically add these new additions at the time the deluxe burger
  24. * object is created, and then prevent other additions being made.
  25. * All 3 classes should have a method that can be called anytime to show the base price of the hamburger
  26. * plus all additionals, each showing the addition name, and addition price, and a grand/final total for the
  27. * burger (base price + all additions)
  28. * For the two additional classes this may require you to be looking at the base class for pricing and then
  29. * adding totals to final price.
  30. */