1. Create a Java project named Answer 2. Define the class KEry based on the given descriptions. 3. Copy class KFryApps_Stage1.java into your project (from MS-Teams). 4. Run KFryApps_Stage1 program to...


1. Create a Java project named Answer<br>2. Define the class KEry based on the given descriptions.<br>3. Copy class KFryApps_Stage1.java into your project (from MS-Teams).<br>4. Run KFryApps_Stage1 program to get the given output.<br>Problem Description:<br>You need to construct a class KFry with all attributes as follows:<br>1. totalKErvOrder (int)<br>2. totalSales (double)<br>3. neQfSriekQrder(int)<br>4. neQfQriginalOrder(int)<br>5. neQfHonevQrder(int)<br>6. KoreanChicken(stack of String)<br>Create the following methods for class KEry, It is COMPULSORY to implement the concept of<br>stack data structure while performing each of these task.<br>1. Create a constructor that will set value 0.0 to attribute to totalSales and value 0 to attributes<br>tetalKErvOrder, neQfSrickOrder, neOfOriginaOrder and noQfHonevOrder.<br>2. The addOrder) method will receive newKFrvOrder and update it into the KoreanChicken<br>stack. This method will also update the value of three attributes; neQfSpicvQrder.<br>neQfQriginalOrder, and noofHonevQrder.<br>3. The calculateAndPrintAllOrders) method will:<br>i)<br>Print all elements of KoreanChicken stack.<br>ii) Count and print totalKFrvQrder. The totalKErxQrder refers to number of orders for 3<br>Korean chicken menus.<br>iii) Calculate and print the tetalSales based on the following menu price: Chicken Spicy:<br>RM20.90, Chicken Original: RM15.90 and Chicken Honey – RM17.90.<br>iv) Print out the number of order for each chicken menu.<br>Output from this method as shown in the 1st to 6th lines of each test case in Answer Output.<br>At the end of this task, the KoreanChicken stack should remain holding all menu orders as<br>they have been entered.<br>

Extracted text: 1. Create a Java project named Answer 2. Define the class KEry based on the given descriptions. 3. Copy class KFryApps_Stage1.java into your project (from MS-Teams). 4. Run KFryApps_Stage1 program to get the given output. Problem Description: You need to construct a class KFry with all attributes as follows: 1. totalKErvOrder (int) 2. totalSales (double) 3. neQfSriekQrder(int) 4. neQfQriginalOrder(int) 5. neQfHonevQrder(int) 6. KoreanChicken(stack of String) Create the following methods for class KEry, It is COMPULSORY to implement the concept of stack data structure while performing each of these task. 1. Create a constructor that will set value 0.0 to attribute to totalSales and value 0 to attributes tetalKErvOrder, neQfSrickOrder, neOfOriginaOrder and noQfHonevOrder. 2. The addOrder) method will receive newKFrvOrder and update it into the KoreanChicken stack. This method will also update the value of three attributes; neQfSpicvQrder. neQfQriginalOrder, and noofHonevQrder. 3. The calculateAndPrintAllOrders) method will: i) Print all elements of KoreanChicken stack. ii) Count and print totalKFrvQrder. The totalKErxQrder refers to number of orders for 3 Korean chicken menus. iii) Calculate and print the tetalSales based on the following menu price: Chicken Spicy: RM20.90, Chicken Original: RM15.90 and Chicken Honey – RM17.90. iv) Print out the number of order for each chicken menu. Output from this method as shown in the 1st to 6th lines of each test case in Answer Output. At the end of this task, the KoreanChicken stack should remain holding all menu orders as they have been entered.
Answer Input<br>The first line is an integer N that represent the test case. Followed by N lines, where each line<br>contains a list of newKFrvOrder that end with string “closed

Extracted text: Answer Input The first line is an integer N that represent the test case. Followed by N lines, where each line contains a list of newKFrvOrder that end with string “closed". +Answer Sample Input-Output Input 3 spicy spicy honey honey, original griginal closed spicy honey spicy original spicy spicy honey honey bonex original spicy honey boney, original original closed honey spicy spicy closed All Orders: original original honey honek spicy spick Total KERN, Orders: 6 Output Total Sales: RM109.40 Number of Order Chicken Spicy: 2 Number of Order Chicken Original: 2 Number of Order Chicken Honey: 2 All Orders: original original honey banek spicy original honey bonek banex spicy SRİGK original spicy honey spicy Total KERN Orders: 15 Total Sales: RM275.50 Number of Order Chicken Spicy: 5 Number of Order Chicken Original: 4 Number of Order Chicken Honey: 6 All Orders: spicy SRick honey Total KERN Orders: 3 Total Sales: RM59.70 Number of Order Chicken Spicy: 2 Number of Order Chicken Original: e Number of Order Chicken Honey: 1
Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here