Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help Link for existing code: https://www.chegg.com/homework-help/questions-and-answers/fruit-make-change-s-necessary-class-work-correctly-completed-test-harness-public-class-fru-q34759653 Lab 04 Instructions.pdf (SECURED)-Adobe Reader File Edit View Window Help 66796 | Tools Fill 8 Sign Comment This
Please help
Link for existing code:
https://www.chegg.com/homework-help/questions-and-answers/fruit-make-change-s-necessary-class-work-correctly-completed-test-harness-public-class-fru-q34759653
Lab 04 Instructions.pdf (SECURED)-Adobe Reader File Edit View Window Help 66796 | Tools Fill 8 Sign Comment This lab requiras you to make code dhange to support irpiementing an interface Review the rexrs material regarding Interfaces betore beginning- Your users have asked you to begin building a shopping cart system for a grocery store. Right now, there arent many classes to be included in the application, bur these few classes (in unrelated hierarchies) s all be able to calculate an extended price and ust all have access t0 the local sales tax rone. You wil need to make dhanges in classes Produce, Fruit,vegetable, and Giftcard so support tho Interface Rineout (provided tou You will also need to add two lines of code to the test harness Test Labe4. Given UML describing the dasses and interface A zipped folder containing: Complete cod0 for the RingOut martoceDO NOT CHANGE THIS CODE Staring point code for the following clanes: * o Produce o Fruit o Vegetable o Giftcard A test harness: Test Labe4, you will need to make modifications to this Expected output from the test harness Task Requirements Ringout The somplete interface code has been provided to you. This interface includes one attribute, taxRate, which will be available 10 all objecs inglemerting the interface. I also idudes a default method, chkTaxable, with a concrete definition provided. The availability of defodt methods in interfaces is an enhancement new to SE8 of Java. You will moke ne channes to the interface code. Produce The Produce cless must be modified to use the interface Ringout. No interface metheds need defined in is dass. so be I3 2041 Lab 04 82019 Terri Davis Spring 2019 9:11 PM O Type here to search Lab 04 Instructions.pdf (SECURED)-Adobe Reader File Edit View Window Help 66.7% Tools Fill 8 Sign Comment Fruit You will need to provide code to support the Ringout interface. Make no other changes in the dass Vegetable You will need to provide code to support the Ringout interface. Make no other changes in the dass GiftCard Modify the Giftcard class to use the RingOut interface. You will need to provide code to suppor the interfoco. Make no other dhanges in the doss. Test Labe4 Mak the necessary danes to ta test harness: 1. Declare an array no hold 4 objects of mixed types/dasses implementing thRingout interface. Do not move the dedaration from where it has been started Write the enhanced for loop control shatement to procoss tearray. Do not change the body ot the loop as provided Testing Your test resdts should exacfly match those provided Submitting Your Work Create a zipped folder containing five (5) source modules. Produce.java Fruit.java - Vegetable.java GiftCard.java Test Labe4.java Submit the sipped folder through Blackboard for this lab assignmenn O Type here to search 9:11 PM 2/9/2019 2 Lab 04 UML Diagrams.pdf (SECURED) - Adobe Reader File Edit View Window Help 68.3% |- Tools Fill 8 Sign Comment Sign In Export PDF Adobe ExportPDF Convert PDF files to Word or Excel online. Select PDF File: Produce implements RingOut Attributes private product Contains the name or type ot Produce Operations Lab 04 UML Diagrams.pd public public public toStringl ):String Produce 1 file/415 KB ype Produce Ful Returns a formatted String The Lass item is Convert To: Microsoft Word (docx) Recognize Text in English(U.S.) Change Convert - Create PDF Edit PDF Combine PDF Send Files Store Files Produce [C) 2019 Terri Davis IS 2041, Spring 2019 Lab 04 9:11 PM 2/9/2019 O Type here to search rP ^ 41) Lab 04 UML Diagrams.pdf (SECURED-Adobe Reader File Edit View Window Help 68.3% |- Tools Fill 8 Sign Comment Sign In Export PDF Adobe ExportPDF Convert PDF files to Word or Excel online. Select PDF File: Vegetable extends Produce Attributes private price: double Price per pound of fruit Lab 04 UML Diagrams.pd Operations 1 file/415 KB able vegetable( type: String. Null constructor doubla: prc Convert To: double: cnt ) Microsoft Word (docx) toStringl J: String Returns a formatted String The nameofcLass 1tem is product. The price is sprice each for count Extended Price: calcExtendedPrice. Recognize Text in English(U.S.) Change NOTES Convert calcExtendedPrice is an abstrect method of the inherited interface R - Create PDF Edit PDF Combine PDF Send Files Store Files Vegetable (c) 2019 Terri Davis IS 2041, Spring 2019 Lab 04 9:12 PM 2/9/2019 O Type here to search rP ^ 41) Lab 04 UML Diagrams.pdf (SECURED-Adobe Reader File Edit View Window Help 45 68.3% |- Tools Fill 8 Sign Comment Sign In Export PDF Adobe ExportPDF Convert PDF files to Word or Excel online. Select PDF File: GiftCard Lab 04 UML Diagrams.pd acardwha:tring 1 file/415 KB tain:tring Convert To: Microsoft Word (docx) Recognize Text in English(U.S.) Change Convert - Create PDF Edit PDF Combine PDF Send Files Store Files 20AL, Saring arus 9:12 PM 2/9/2019 O Type here to search rP ^ 41) Lab 04 UML Diagrams.pdf (SECURED-Adobe Reader File Edit View Window Help 68.3% Tools Fill 8 Sign Comment Sign In Export PDF Adobe ExportPDF Convert PDF files to Word or Excel online. Select PDF File: RingOutStep 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