Question: I need help with this JAVA assignment this week, Java programming language Project 4: Dina's Dinettes 1 Objective This project is the first time you'll

I need help with this JAVA assignment this week,
Java programming language  I need help with this JAVA assignment this week, Java programming
language Project 4: Dina's Dinettes 1 Objective This project is the first
time you'll create your own objects, along with private data, methods, etc.
This isn't a complete working system with a user interface; it's just
a chance for you to create classes, then instantiate and test them.
You'll create two classes, one of which uses the other ("has-a" relationship)

Project 4: Dina's Dinettes 1 Objective This project is the first time you'll create your own objects, along with private data, methods, etc. This isn't a complete working system with a user interface; it's just a chance for you to create classes, then instantiate and test them. You'll create two classes, one of which uses the other ("has-a" relationship) 2 About Dina's Dinettes Dina's Dinettes sells one type of dinette set. An order consists of one table, zero to ten chairs, and zero to two leaves?. The customer also gets one free item with their order, either (1) a cleaning kit, (2) seat cushions, or (3) padded feet for the table and chairs. The code you'll write is the start of a system to create and process orders and maintain store inventories. 3 Objects You'll Create Here is the UML Class Diagram for the objects you are to create, and how they relate to each other. Please pay attention to notation (including parameter and return types). There's a lot of information here; please understand it all (and ask questions if you're unclear) before starting to code DinetteOrder Dinette Store d-you ll in this part Td- you fillin this part Integer DineteOrden orderNumber: Integer, chairCount:imeger chairinventory: Integer, lea nventory: Integern gefT ablelinventoryo: Integer eaCount: inbeger, option:Option) DineteOrder(orderNumber: Integer) ryo: Integer ). getorderNumber( ) . Integer Option getleafinventoryo:Integer getTablesonrdero: Integer egetChairsOnOrdero: Integer getleavesOnOrdero: Integer *getTotalSaleso: Double getAvgOrderPriceo:Double .getChairCount):Integer getLeafCoumt):Integer .getoptiont):Option .getPri : Double SEAT CUSHIONS FEET submitOrder(order: DinetteOrder): Double toStringo: String setChairCount(chairCount:Integer) +setleatcountleatcount: Intager) .setoption(option: Opbon) toString):String You're writing Supplier code here, and no Client code. You may want to create a simple Main as a demonstratio cignment and won't he eraded pay attention to notation (including p understand it all (and ask questions i DinetteStore (tbd-you fill in this part) +DinetteStore(tablelnventory: Integer, chairlnventory: Integer, leafinventory: Integer) +getTablelnventory0: Integer +getchairlnventory0: Integer +getLeafinventory0 Integer +getTablesOnOrder0:Integer +getChairsOnOrderO: Integer +getLeavesOnOrder0:Integer +getTotalSales0: Double tgetAvgOrderPrice0 Double +submitOrder(order: DinetteOrder): Double +toString0: String DinetteOrder (tbd- you fill in this part) +DinetteOrder(orderNumber: Integer, chairCount: Integer, leafCount: Integer, option: Option) +DinetteOrder(orderNumber: Integer) +getorderNumber(): Integer +getChairCount): Integer +getLeafCount() : Integer +getoption(): Option +getPrice(): Double +setChairCount(chairCount: Integer) +setLeafCount(leafCount: Integer) +setOption(option : Option) +toString):String er Option CLEANING-KIT SEAT CUSHIONS PADDED_FEET Here the UML Class Diagram for the objects you are to create, and how they relate to each other. Please is pay attention to notation (including parameter and return types). There's a lot of information here; please understand it all (and ask questions if you're unclear) before starting to code! DinetteStore DinetteOrder tbd-you fill in this part (tbd- - you fill in this part) +DinetteStore(tablelnventory: Integer +DinetteOrder(orderNumber: Integer, chairCount: Integer, chairlnventory: Integer, leafinventory: Integer) getTableinventory0: Integer .getChairinventory0:Integer +getLeafinventory0: Integer +getTablesOnOrderO: getChairsOnOrdero:Integer .getLeavesOnOrderO: Integer getTotalSales0: Double +getAvgOrderPrice0:Double leafCount: Integer, option: Opton) DinetteOrder(orderNumber: Integer) + getorderNumber( ) : Integer Option nteger +getChairCount): Integer getleafCount(): Integer +getoption(): Option getPrice():Double SEAT CUSHIONS PADDED_FEET submitOrder(order: DinetteOrder): Double to Stringo: String +setChairCount(chairCount: Integer +setleatCount(leatCount: Integer setoption(option : Option) toString):String Constraints and Assumptions Create no static methods except within test classes. Mark each instance variable and each method as either public or private (and use no other modifier follow the UML where it gives guidance and make smart decisions where it doesn't. Use exactly the method names shown, or instructor test code will fail (if so, you'll lose points). Look carefully at the parameter data types and the return data types; they give you clues DinneteOrder's order number is like an invoice number; it's not a count of anything. It doesn't auto- increment, it's provided from outside the system. 4 DinneteOrder's Option should be an enumerated type. These are discussed in videos and in an appendix at the end of your textbook. The defaults for a DinnetteOrder are: 1 table, 4 chairs, O leaves, and the Cleaning Kit option. .DinneteStore's submitOrder maintains the appropriate internal counts and totals, and then returns the price of the order just processed. ("Hey, store, here's an order for you; process it , please!"). Note .DinneteStore's getAvgOrderPrice calculates and returns the average order price ($0.00 if no orders . The toString functions should do their best to summarize the state of the object instance in questions .Test all possible methods and state via unit testing. Follow what we did in class to use the JUnit test that for now we aren't storing these orders; handle necessary accounting at submit time. yet exist). include newlines in the strings to make the result displayable and attractive. framework; there's a video on the topic, as well. Write one unit-test class for each production class. Tables are priced at $229.00. Chairs are $69.00 each. Leaves are $45.00 each. .Throw an IllegalArgumentException if any of these preconditions are violated o o o o Any of the store's initial inventory counts are negative Inventory is insufficient to cover a submitted order. The number of chairs or leaves ordered is outside the allowable range (discussed here). The "usual suspects" are misused (null or empty strings, null object or enum references). 5 Code Implementation Follow the 6 Testing The testing required here is significant. You may spend as much time writing your test method as you d writing your production code. Your test code needs to test everything your object can do (exception fo Ul-heavy code like toString); don't treat it lightly. Don't forget to test constructors and precondition And don't forget test code is still code and can have bugs, so be suspicious if everything pass miraculously the first time, i.e., test that you can induce failures and get the appropriate error messag shown

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!