This programming assignment will utilize Object Oriented principles to develop an application called DessertShop.

I don’t know how to handle this Java question and need guidance.

Develop an application that manages the orders for a dessert shop. You will be implementing an abstract parent class (DessertItem) and the necessary derived classes (Candy, Cookie, and IceCream) using Inheritance. Be sure constructors for the derived classes call the appropriate constructor of the super class. You will also implement a DessertShop class that will act as a container for the other classes. This is outlined further in the steps below.

1. Create a NetBeans project called CS182Project2

2. Before writing any code, review the required attributes and properties for each class required in this project and create a UML class model. You may use the online tool draw.io. Be sure to save your completed model as either a jpeg image or PDF document in your project 2 folder. Give it an obvious name like Project2ClassModels and make sure it is in your top level Project2 folder so I can find it. Also, be sure you are showing class relationships (I.e., inheritance).

3. Implement an abstract parent class called DessertItem with only one attribute called itemName. It must have a default constructor and a custom constructor that will pass the name of the item. It must have a getter and setter method for itemName and an abstract method called getCost(). Implement a toString() method that returns the itemName.

4. Implement a Candy class derived from DessertItem with the added attributes of weight and pricePerPound, default and custom constructors, getters and setters for weight and pricePerPound. Implement the following methods: getSubtotal() will return weight * costPerPound; getTax() will return the sales tax (7% sales tax rate) on the subtotal; getTotal() will return subtotal + sales tax. Implement a toString() method that returns the formatted output of the item and total price.

5. Implement a Cookie class derived from DessertItem with the added attributes of itemCount and pricePerItem, along with default and custom constructors, getters and setters for itemCount and pricePerItem, Implement the following methods: getSubtotal() will return itemCount * pricePerItem; getTax() will return the sales tax (7% sales tax rate) on the subtotal; getTotal() will return subtotal + sales tax. Implement a toString() method that returns the formatted output of the item and total price.

6. Implement an IceCream class derived from DessertItem with the added attributes of numSccoops, pricePerScoop and toppingCost, along with default and custom constructors, getters and setters for numSccoops, pricePerScoop and toppingCost. , Implement the following methods: getSubtotal() will return itemCount * pricePerItem; getTax() will simply return 0 (no sales tax on ice cream); getTotal() will return subtotal + sales tax. Implement a toString() method that returns the formatted output of the item and total price.

7. Implement a DessertShop class which will utilize the Candy, Cookie and IceCream classes. This class will declare an enumerated type ‘DessertType’, which will be used in a selection structure to determine which action needs to be taken.depending on the DessertType. The class must define a total of three arrays (one for each DessertType – cookie, candy, ice cream), which can store up to 5 items each and counters to track the number of items in each array, and internal variables for subtotal, total tax and total of all items. In addition to the constructors, setter and getter methods, the DessertShop class will contain the following public methods: getDessertChoice() – this method must clearly prompt the user for the choice of none (order complete), cookie, candy, ice cream and return the enumerated dessert type. addCookie() – this method must prompt the user for the required cookie information (I.e., type of cookie, qty and price each), create a cookie object, add it to the cookie array and update the various totals. addIceCream() – this method must prompt the user for the required ice cream information, create an ice cream object, add it to the ice cream array and update the various totals.

3

addCandy() – this method must prompt the user for the required candy information, create a candy object, add it to the candy array and update the various totals. displayReceipt() – will display the receipt. See sample program output section for layout and items that must be displayed. saveReceiptToFile() – will save the receipt information to a text file called receipt.txt. It will contain the exact same information as displayReceipt(). the program should prompt for specific details in order to calculate the price for each item. If Candy, prompt for Name of Candy, Number of Pounds and Price per Pound. If Cookie, Prompt for Name of Cookie, Number of Cookies and Price per item. If IceCream, prompt for Name of Ice Cream, Number of Scoops, Price per Scoop and Topping Price.

8. Implement a cash register application. Your main() method will create an instance of the DessertShop class and use the various methods to get order information, and, when the order is complete, display the receipt on the screen and save the receipt to a text file.

9. Once everything is complete and working, generate a JavaDoc. To do this, right-click your project icon and select Generate Javadoc in the pop-up menu.

Need your ASSIGNMENT done? Use our paper writing service to score good grades and meet your deadlines.


Order a Similar Paper Order a Different Paper