You are required to develop a takeaway order management system for a restaurant that delivers pizza…

You are required to develop a takeaway order management system for a restaurant that delivers pizza and pasta. Your program should maintain a list of customer orders that need to be delivered at any one time. When first run, it should present the user with a menu with the following options: 1. Enter the details of a customer order, which is then added to the order list. 2. Deliver an order, and remove it from the list. The next order to be delivered should always be the order that has been on the list for the longest time. The details of the delivered order should be printed to the screen. 3. Print out details of all the orders in the list. 4. Exit the program. This menu should continue running in a loop until Option 4 is selected by the user. An order's details consist of: - a list of food items - a customer name - a customer contact number - a delivery address - the meal type of the order, i.e., whether or not it is vegetarian, vegan, or contains meat. This information should be determined by the program, based on the food items contained in the order. If there is any food item with meat in the order, then the order's meal type is classed as 'meat'. If there are no meat items but some vegetarian items, then the order is classed as 'vegetarian'. For an order to be classed as 'vegan', there must be no food items that are meat or vegetarian. - a total cost, which is calculated by the program. This is the sum of the prices of all the food items in the order. - A pizza has a list of toppings, which can be one or more of any combination of the following six items: ham, cheese, pineapple, mushrooms, tomato, seafood. For a pizza to be vegetarian, it must not contain ham or seafood. For a pizza to be vegan, it must not contain ham, seafood, or cheese. - A pasta meal has only a single topping, which is one of the following four items: bolognese (meat), marinara (meat), primavera (vegetarian), tomato (vegan). - Pizza and pasta without any toppings can be assumed to be vegan. Each food item also has an associated price, which is calculated by the program as follows: - The base price of either a pizza or pasta meal is $11.50. - Each pizza topping adds an extra $2, except pineapple which adds $2.50 and seafood which adds $3.50. - For the pasta toppings, tomato adds $4, bolognese and primavera each add $5.20, and marinara adds $6.80. For full marks, your design should contain all of the following: - inheritance, with an abstract class as the super class. - an interface which ensures that the price and meal type can always be retrieved from both food items and orders - at least one enum type - at least four classes overall (including the abstract class). Code design and correctness (35 marks) High-level functionality (7 marks) - Implementing overall main menu structure correctly - Adding an entered order correctly to the order list - Removing the oldest order from the order list, and printing that order's details to the screen (using appropriate calls to toString methods) - Printing all order details (using appropriate calls to toString methods) Correctly retrieving and storing order details (8 marks) - Storing the customer's name, contact number, and delivery address with the order - Allowing the user to enter a list of food items, which are stored with the order - Allowing the user to define multiple toppings for each pizza item, and a single topping for each pasta item Price and meal type calculations (8 marks) - Ensuring prices of orders and food items are calculated and reported correctly - Ensuring meal types (meat/vegetarian/vegan) of orders and food items are calculated and reported correctly Design requirements (12 marks) - Sensible overall class design and adherence to good design principles - Modularisation of complex tasks within classes - Validation checks on user input - Appropriate and correct use of inheritance - Appropriate and correct use of an abstract class - Correct use of an interface to ensure price and meal type are implemented as required - Appropriate and correct use of enum type

You are required to develop a takeaway order management system for a restaurant that delivers pizza and pasta. Your program should maintain a list of customer orders that need to be delivered at any one time. When first run, it should present the user with a menu with the following options: 1. Enter the details of a customer order, which is then added to the order list. 2. Deliver an order, and remove it from the list. The next order to be delivered should always be the order that has been on

Read More

1) Define an array with 10 unsigned integers in assembly code and write an assembly program that…

1) Define an array with 10 unsigned integers in assembly code and write an assembly program that calculates the mean of these 10 integers (truncating the result to an integer). 2) Write an assembly program that converts all lowercase letters to their corresponding upper cases. 3) Write an assembly program that calculates the following function. Assume register r0 holds the signed integer x, and register r1 saves the result. f(x)=10 if x0. 4) Translate the following C program into an assembly program. The C program finds the minimal value of three signed integers. Assume a, b, and c are stored in register r0, r1, and r3, respectively. The result min is saved in register r4. if (a<b && a<c) { min=a; } else if (b<a && b<c) { min=b; } else { min=c; } 5) Write an assembly program that finds the least common multiple (LCM) of two integers. For example, LCM(4,6)=12. 6) Write an assembly program that blinks an LED with a time interval of one second.

1) Define an array with 10 unsigned integers in assembly code and write an assembly program that calculates the mean of these 10 integers (truncating the result to an integer). 2) Write an assembly program that converts all lowercase letters to their corresponding upper cases. 3) Write an assembly program that calculates the following function. Assume register r0 holds the signed integer x, and register r1 saves the result. f(x)=10 if x0. 4) Translate the following C pro

Read More

Create a java code that have a predetermined dataset of anonymous individuals’ license plate numbers…

Create a java code that have a predetermined dataset of anonymous individuals’ license plate numbers and whether they have a yearly, monthly, or daily parking pass. With the code, you should be able to enter one of the sample license plate numbers and be able to tell if they have a yearly, monthly, or daily parking pass.

Read More

Objective: – Use fundamental data structures such as stacks, queues, linked-lists, and trees to…

Objective: - Use fundamental data structures such as stacks, queues, linked-lists, and trees to represent data and meet application requirements. - Demonstrate knowledge of recursion by describing common applications and by effectively using it to solve problems. - Use appropriate algorithms to solve common computing problems. Problem: In this problem, you will rearrange the nodes in a linked-list from the smallest integer to the largest integer (i.e., the head node should hold the smallest integer in the list). Implement a method called listSort() that receives a value head that points to the first node of the unsorted linked-list. The method then returns a value head which is a reference to the sorted list. The method signature should use the following specification: IntNode listSort(IntNode head) For simplicity, your method will use the selection sort algorithm to sort the linked-list. NOTE: 1. Implement the linked-list application as demonstrated in the lecture video. Therefore, you should submit a complete, stand-alone, runnable program. 2. Your method should be implemented such that it moves an entire node from the unsorted linked-list to the sorted linked-list. Therefore, the unsorted list should reduce in size as the sorted list increases in size. This method should NOT create new nodes. 3. At the end of the operations, the sorted list should have the same number of nodes as the unsorted list initially had.

Objective: – Use fundamental data structures such as stacks, queues, linked-lists, and trees to represent data and meet application requirements. – Demonstrate knowledge of recursion by describing common applications and by effectively using it to solve problems. – Use appropriate algorithms to solve common computing problems. Problem: In this problem, you will rearrange the nodes in a linked-list from the smallest integer to the largest integer (i.e., the head node should hold the smallest inte

Read More

Please import the “admit.csv” into Rstudio. In this dataset, we know the GRE score, the GPA, and the…

Please import the "admit.csv" into RStudio. In this dataset, we know the GRE score, the GPA, and the rank of 400 applicants for a graduate program. We also know if each of the candidates is admitted. In the admit column, 1 stands for "admitted", and 0 stands for "rejected". Please answer the following questions and include the codes. 1. Import the dataset and call it "mydata". Then check the structure of the data. 2. Convert the data type of the admit and the rank column from int to factors. 3. Randomly select 80% of the dataset as the training set and the rest as the testing set. 4. Train a decision tree model, using admit as the category, and GRE, GPA, and rank as predictors. Then plot the tree. 5. Please answer the question: if a candidate has a GPA of 3.7 and a rank of 4, does this candidate have a higher chance to be admitted or to be rejected? Please note that when you only have two categories, the darker proportion stands for the proportion for 1 in the end node of the tree plot. 6. Please calculate the accuracy of your decision tree model.

Please import the “admit.csv” into RStudio. In this dataset, we know the GRE score, the GPA, and the rank of 400 applicants for a graduate program. We also know if each of the candidates is admitted. In the admit column, 1 stands for “admitted”, and 0 stands for “rejected”. Please answer the following questions and include the codes. 1. Import the dataset and call it “mydata”. Then check the structure of the data. 2. Convert the data type of the admit and the rank column from int to factors. 3.

Read More

Linda owns a small fruit booth. She wants to print out a beautiful menu to list all types of fruits…

Linda owns a small fruit booth. She wants to print out a beautiful menu to list all types of fruits she sells. Therefore, she can distribute this menu and hope to attract more customers to visit her booth. Linda named her booth 'Happy Fruit World". The fruits she has are listed below: Here is the sample output: This menu may need to be generated from time to time based on the possible changes of booth name, fruit names or prices, or the advertisement slogans. Therefore, you need to code this menu generator tool based on the following specifications. Name your Python file as A1Q3.py. Code Specification: 1) Store the booth name in a variable. 2) Store the slogan in a variable. 3) Store the fruit names in a list and store the price in another list. 4) For any duplicated values, save them in a variable. 5) Treat the symbol "@" as a separator. The sample output will be similar to the below when some variable values are changed.

Linda owns a small fruit booth. She wants to print out a beautiful menu to list all types of fruits she sells. Therefore, she can distribute this menu and hope to attract more customers to visit her booth. Linda named her booth ‘Happy Fruit World”. The fruits she has are listed below: Here is the sample output: This menu may need to be generated from time to time based on the possible changes of booth name, fruit names or prices, or the advertisement slogans. Therefore, you need to code this

Read More