I need the code in java netbeans. I need the code to be exactly the same from
Fantastic news! We've Found the answer you've been seeking!
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 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.
Transcribed Image Text:
• • 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. • • 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.
Expert Answer:
Answer rating: 100% (QA)
Creating the exact code for your request involves several classes including AnnualFlower OrderFlower and MyUtilityClass Additionally there needs to be ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Sodium tripolyphosphate (Na5P3O10) is used in many synthetic detergents. Its major effect is to soften the water by complexing Mg2+ and Ca2+ ions. It also increases the efficiency of surfactants, or...
-
Helium (He), a monatomic gas, fills a 0.010-m3 container. The pressure of the gas is 6.2 105 Pa. How long would a 0.25-hp engine have to run (1 hp = 746 W) to produce an amount of energy equal to...
-
A bag holds 10 black jellybeans, 12 green ones, 3 orange ones, and 20 blue ones. If you reach in and grab one randomly, what is the probability of picking sequentially (a) a black one, \((b)\) an...
-
Thomas Brookie went shopping in the Winn Dixie Supermarket. He purchased his items and brought them to the car without incident. He then made additional trips in and out of the store to get empty...
-
You are a pricing analyst for QuantCrunch Corporation, a company that recently spent $10,000 to develop a statistical software package. To date, you only have one client. A recent internal study...
-
Sub Saharan Africa: Be able to find Angola, Benin, Burundi, Burkina Faso, Chad, Cameroon, Democratic Republic of the Congo, Eritrea, Ethiopia, The Gambia, Ghana, Ivory Coast, Kenya, Madagascar, Mali,...
-
Pop Corporation acquired 70 percent of the outstanding voting stock of Son Corporation for $182,000 cash on January 1, 2016, when Son's stockholders' equity was $260,000. All the assets and...
-
answering the following questions: Assume that you are hired as a consultant to help Otis Toy Trains. What recommendations would you give to the management of Otis regarding the attractiveness of...
-
1. What is a suspense account, and when is it created in accounting? 2. How long can an account typically remain in a suspense account before corrective action is taken? 3. How are suspense accounts...
-
Suppose that an analyst has estimated a = 1.0 % and b= 1.10 On a day where there is good news, US GDP numbers came in very strong, which causes the market goes up by 1.0%. What is the expected return...
-
Concepts of Positive Psychology . Find a website that reflects important positive psychology concepts and that would contribute to a person's overall well-being. Post a link to this website. Provide...
-
Draw an indifference map for each: Part A: Suppose that a labor union cares only about a wage payment to its member. Part B: Now the labor union cares only about the employment level of its members....
-
research and explain the history, common focus/topics, and information on positive psychology as if to explain to a person who has never heard of it. You will need a minimum of 5 references for this...
-
The advancement in technology has been exceptionally fast in the 20th and 21st century. With electronic technology and machines being produced and improved all the time, it was very likely that along...
-
XYZ Inc. a calendar year, accrual basis corporation, had the following items during 2021: Gross revenue from operations Cost of goods sold $420,000 ($180,000) $9,000 LT capital gain .LT capital...
-
Greg died on July 1, 2012, and left Lea, his wife, a $50,000 life insurance policy which she elects to receive at $5,000 per year plus interest for 10 years. In the current year, Lea receives $6,200....
-
Skyler is covered by his company's health insurance plan. The health insurance costs his company $3,500 a year. During the year, Skyler is diagnosed with a serious illness and the health insurance...
-
Jim (age 50) and Martha (age 49) are married with three dependent children. They file a joint return for 2012. Their income from salaries totals $50,000, and they received $10,000 in taxable...
-
Which of these adaptations is the result of sexual selection? (a) the spines on cactus plants (b) parental care in male poison dart frogs (c) the songs of male birds (d) dark wings in peppered moths
-
Which of the following provides evidence for evolution? (a) changes in the coloration of peppered moth populations over time (b) the presence of vestigial eyes in cave salamanders (c) the fact that...
-
If you put a heavy load in a wheelbarrow, the force you apply to the handles is much less than the weight of the load and the wheelbarrow. To lift with the least force, you put the load toward the...
Study smarter with the SolutionInn App