Java代寫 | COMP1040 Assignment 2Programming Fundamentals

專業CS代寫團隊5年代寫經驗,專注于CS作業代寫,Computer science代寫,Java代寫,Python代寫,C代寫,C++代寫,數據庫代寫,PHP代寫,算法作業代寫,CS homework代寫,R語言代寫, math代寫, 統計代寫, 金融代寫, business代寫, economic, accounting代寫等, 涉及英國CS代寫, 北美CS代寫, 加拿大CS代寫, 澳洲CS代寫, 新西蘭CS代寫, 香港CS代寫
Blog Details

Java代寫 | COMP1040 Assignment 2Programming Fundamentals

COMP1040 Assignment 2
英国作业代写,✔美国代考,【assignment代写】,business代写Programming Fundamentals

INTRODUCTION
This document describes Assignment 2 for Programming Fundamentals. The assignment will require you to
write classes to represent a Pizza Shop. You will be required to create an inheritance hierarchy for Food
used as ingredients in a Pizza and to write classes for operating a Pizza Shop. Your ingredients and your
menu of Pizzas should be read in from text files. You must write receipts for all ordered Pizzas to a text file.
The program will require a text-based user interface that allows the user to select, modify and order Pizzas.
This document describes the classes, fields and methods required. It describes the format of the text files.
It also shows examples of the textual user interface which you will need to replicate.
This assignment is an individual task that will require an individual submission. You will be required to
submit this project in week 12 of the study period. In the case that you do not fully understand the
assignment, please ask your lecturer.
SUMMARY
ingredients
The ingredients package contains classes that allow us to create a Pizza and add toppings onto it.
The package contains a class called FoodSet that contains a resizable array of Foods. The FoodSet must
ensure that there is only one copy of each Food. If its array fills up, it will automatically double in size.
The Food class contains a name and price. This class will be constructed to represent various pizza
toppings like tomato sauce, cheese, ham, and pineapple. Any Food item added to a Pizza that was not part
of the original toppings will add its price to the Pizza.
PizzaBase will be derived from Food. It represents the round bread that the rest of the toppings will go on.
It will contain the method setSize that takes a string ("small", "medium", or "large") and sets the diameter
and price accordingly. There will be methods for calculating the square inches and calculating the price per
inch2
. These methods will be necessary to change the price for PizzaBases of different sizes.
Pizza is also derived from Food and contains a PizzaBase and two FoodSets: toppings and
originalToppings. Many pizza shops allow you to customize your order by removing ingredients you do not
want or by adding new ingredients for a fee. Our program will do the same. There will be methods for
adding and removing toppings, and for changing the PizzaBase and size. The getPrice() method must add
a fee for any Food that is in toppings that was not in originalToppings.
pizzashop
The pizzashop package contains classes that allow us to open and operate a pizza shop. It will read
ingredients and the pizza menu from file, allow the user to order and customize pizzas using a text-based
interface, and save receipts for orders to a file.
PizzaMenu is derived from FoodSet and uses polymorphism to ensure you may only add and get Pizzas
from it.
The PizzaShop will need to create a FoodSet of ingredients and a PizzaMenu of Pizzas using information
read from a file. It allows the user to use keyboard input to select a Pizza from the PizzaMenu and to
customize it, adding or removing toppings, or changing the base or size. The user may order any number of
Pizzas in this way before exiting the program. The receipt for each order will be written to a file.
FILES
You have been provided with a folder called files containing a folder called receipts and two files: menu.txt
and ingredients.txt.
ingredients.txt
The ingredients file contains information which will be used to construct the various pizza ingredients. Each
line represents the name and price for one ingredient. For Food items the format is "name $price".
PizzaBases are prepended with the string "base:" such as "base: deep pan $8". In this case, name is "deep
pan" and price is 8.0. The file may contain the following:
base: deep pan $8
base: thin crust $8
base: cheese crust $12
tomato sauce $0
bbq sauce $0
sweet chilli sauce $0.5
chedder cheese $1
mozzarella cheese $1
fetta cheese $1
ham $2
salami $3
chicken $4
prawns $5
pineapple $2
onion $1
capsicum $1
jalapenos $2.5
olives $2
mushrooms $2.5
spinach $3
anchovies $2.5
Your PizzaShop class will need to implement a method called loadIngredients() that reads the file and for
each line extracts the name and price. If it starts with the word "base: ", it will construct a PizzaBase,
otherwise it will construct a Food with the extracted information. The Food will then be added to the
PizzaShop's ingredients FoodSet.
menu.txt
The menu file contains the recipe for making all of the pizzas that the pizza shop offers. Each line is in the
format "pizza name $price ingredient name 1, ingredient name 2". The file may contain the following:
Margarita Pizza $12 tomato sauce, mozzarella cheese, chedder cheese
Hawaiian Pizza $12 tomato sauce, mozzarella cheese, ham, pineapple
Meat Lovers Pizza $12 bbq sauce, mozzarella cheese, ham, salami, onion
Supreme Pizza $12 tomato sauce, mozzarella cheese, ham, mushrooms, capsicum, salami,
olives, pineapple
Vegetarian Pizza $12 tomato sauce, fetta cheese, capsicum, pineapple, mushrooms,
spinach, olives
BBQ Chicken Pizza $14 bbq sauce, mozzarella cheese, chicken, onion
Spicy Seafood Pizza $14 sweet chilli sauce, mozzarella cheese, prawns, anchovies,
jalapenos, capsicum, onion
Chicken and Prawn Pizza $16 sweet chilli sauce, fetta cheese, chicken, prawns, spinach
3 of 17
The PizzaShop class must implement a method called loadMenu() that reads the menu file and constructs
a Pizza using information extracted from each line. To construct a Pizza you will need the name, price, a
FoodSet of toppings, a size, and a pizza base. You can assume that all Pizzas in the file are on a "large",
"thin crust", PizzaBase. Each topping should be accessed from the FoodSet created using the
loadIngredients() method. These toppings should go into a new FoodSet and used to construct the Pizza.
英国作业代写,✔美国代考,【assignment代写】,business代写The Pizza will then be added to the PizzaShop's PizzaMenu.

在線客服

售前咨詢
售后咨詢
微信號
Essay_Cheery
微信
北美 论文代写,金融代写,Assignment代写,英文论文润色-100%原创 作业代写,伦敦代写,澳洲代写assignment,,统计代写【包过】 代写被抓,英国代写,,CS作业代写,python代写,美国代写被抓怎么办? Essay代写,澳洲essay代写价格,网课代修,准时✔️高质数学代写 Essay代写,代写作业,网课代修代做-地表最专业的留学生代写机构 留学生代写,网课代修,代写英文-覆盖100+全学科report代写-Essayzhidao 英文论文代写,网课代修,英国、澳大利亚、北美等Essay代写推荐 网课代修,Assignment代写,美国英国留学生ESSAY论文作业代写最【靠谱】 加拿大澳洲英国代写,网课代上,网课代考,论文代写-assignment due® essay代写,留学生代写,英国硕士论文代,经济代写,数学,CS代写