Question: I need the code in java netbeans. I need the code to be exactly the same from the picture below. Also, I provide the instructions
I need the code in java netbeans. I need the code to be exactly the same from the picture below. Also, I provide the instructions on what needs to be done.
The kinds of annuals are Marigold, Pansy, Zinnias and Petunia and cost, respectively, $2.30, $1.50, $5.12 and $3.25.
Display the total order cost for each kind of flower.
Provide sample output after coding if possible.
- This is sample output that needs code.


Modify Lab7 solution into a program that combine the customer orders. Use a 2-dimensional array to solve the following problem. As you know that we are assuming four kinds of annuals. Each customer submits an order for annual flowers that contains: The number of stems of each kind, must be in a specific order (Marigold, Pansy, Zinnias, Petunia) Assume that we can process only 10 customer orders. Set the size of 2D array to [10][4]. Please note that this 2D array must hold flower orders and is different from 2D array in Lab 7. We can stop inputting an order by entering "exit" or input will exit automatically after ten orders are accepted. You should be able to accept the data from the user via the keyboard. Each order should be entered as four values with commas between them. Split the input into separate strings, parse them in appropriate data types and insert them into your 2D order array in the appropriate elements. If no value is entered for an order number/number of stems combination, the value for that element should be 0. For this purpose, modify getInput() of OrderFlowers class. You should be able to get the total of all columns i.e., the sum of all the number of stems for a particular annual flower. For this purpose, add a static method to your MyUtilityClass class to find column total. The method should take a 2 dimensional array of integers and an integer as parameters. The second parameter is the index of a column in the array the user wants to be totalled. The method should total the values in the specified column and return the total. For example, if order1 contains 0,3,4,7 and order2 contains 4,0,1,2, and we want to merge last column, the method should return a number 9. The program must also be able to print all the numbers after merging orders of each kind. For this purpose, you have to make changes to toString() of AnnualFlower and OrderFlower classes.
Step by Step Solution
There are 3 Steps involved in it
Creating the exact code for your request involves several classes including AnnualFlower OrderFlower and MyUtilityClass Additionally there needs to be ... View full answer
Get step-by-step solutions from verified subject matter experts
