Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i need help with this i am in initial computer science class . make sure you read the direction I added the picture of the
i need help with this i am in initial computer science class . make sure you read the direction I added the picture of the data file. i need uml diagram as well.
can not use array list please read the directions and restrictions on the attached pictures.
NOTE: You MAY NOT use arrays, ArrayLists or any other data structure for this assignment. You may not use String.split() for this assignment. Create a UML class diagram representing a restaurant Meal. The meal consists of an appetizer and the appetizer's price, an entre and the entre's price and a dessert and the dessert's price. The Meal has the capability to report the value of all attributes, the total cost of the meal (getTotalCost() added to the Meal class - returns the price of appetizer, entree and dessert) and the current state of the object (using the toString(). The Java program will read a data file a consisting of a restaurant (BJ's Restaurant) meal's dishes with corresponding prices to create Meal objects. The data in the file looks like this (remember that there are 4 meals in the data file : appetizer appetizer price entre entre price dessert dessert price The "driver" will have methods for the following: . Read data from the file to create ONE Meal object at a time, (the data file contains data for 4 meals) - the data file is organized by meal: appetizer followed by its price on the next line, entree followed by its price on the next line, dessert followed by its price on the next line. Display one Meal object at a time and its total, well formatted (if you format your output in the toString() this is relatively easy) An example run (this shows ONE Meal object, yours will have 4 meals, the tip is calculated on the total of all meals) The meal at BJ's Restaurant consists of: Avocado Egg Rolls $6.00 Parmesan-crusted Chicken $19.75 Strawberry Shortcake Pizookie $ 8.25 Total $34.00 mealData.txt Download mealData.txt (364 Bytes) Avocado Egg Rolls 6.00 Parmesan-crusted Chicken 19.75 Strawberry Shortcake Pizookie 8.25 BBQ Tri-Tip Sliders 12.95 Spicy Peanut Chicken with Soba Noodles 17.25 Monkey Bread Pizookie 8.25 Bacon Jam Wings 16.25 Prime Rib 28.95 Pizookie Trio 11.95 Honey Sriracha Brussels Sprouts 7.95 Mandarin Orange-Glazed Pork Chop 21.95 Mini Pizookie 4.25 Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started