Imagine you work in a store and have been asked to keep an inventory of the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Imagine you work in a store and have been asked to keep an inventory of the products for sale. Different people have requested that you sort the list and print it in various ways. You can do that and will do so using each of the different sorting algorithms. 1. Create new project called 10.07 Assignment in your Module 10 Assignment folder. 2. Create an implementation class to define an item in your store. a. Establish instance variables for the item's name, product number, price, and quantity currently in the store. b. Setup a constructor for an item that will initialize all the instance variables. c. Create appropriate methods including a toString method, making sure to format the cost to include the dollar sign and precision to two decimal places. d. Add any additional attributes or behaviors you feel are appropriate. (optional) 3. For this project, you will create a tester class that declares an array for the products in your inventory and makes use methods to sort the data. 4. Declare an array of at least 10 products. Of course, be sure to use school-appropriate items. For example: Chewbacca Mask, 1281, 19.99, 24 5. Design a static method that traverses through the array and prints each element in a table format. 6. Create the following static methods in the tester class. Using each sorting algorithm at least once, you may choose when to employ the insertion, selection, or merge sort. Use each at least once. Sorts using insertion or selection must have the option for ascending or descending order. The merge sort will sort only in ascending order. a. a method that sorts the array by the product number b. a method that sorts the array by the product's name c. a method that sorts the array by the item's price d. a method that sorts the array by the product quantity 7. Test your sorting methods by calling each and displaying the results. Start by showing the array without sorting. Then demonstrate each of the sorts you created. The output should be in a table format. Be sure o clearly label your output so someone looking at it knows which sort was applied each time. Imagine you work in a store and have been asked to keep an inventory of the products for sale. Different people have requested that you sort the list and print it in various ways. You can do that and will do so using each of the different sorting algorithms. 1. Create new project called 10.07 Assignment in your Module 10 Assignment folder. 2. Create an implementation class to define an item in your store. a. Establish instance variables for the item's name, product number, price, and quantity currently in the store. b. Setup a constructor for an item that will initialize all the instance variables. c. Create appropriate methods including a toString method, making sure to format the cost to include the dollar sign and precision to two decimal places. d. Add any additional attributes or behaviors you feel are appropriate. (optional) 3. For this project, you will create a tester class that declares an array for the products in your inventory and makes use methods to sort the data. 4. Declare an array of at least 10 products. Of course, be sure to use school-appropriate items. For example: Chewbacca Mask, 1281, 19.99, 24 5. Design a static method that traverses through the array and prints each element in a table format. 6. Create the following static methods in the tester class. Using each sorting algorithm at least once, you may choose when to employ the insertion, selection, or merge sort. Use each at least once. Sorts using insertion or selection must have the option for ascending or descending order. The merge sort will sort only in ascending order. a. a method that sorts the array by the product number b. a method that sorts the array by the product's name c. a method that sorts the array by the item's price d. a method that sorts the array by the product quantity 7. Test your sorting methods by calling each and displaying the results. Start by showing the array without sorting. Then demonstrate each of the sorts you created. The output should be in a table format. Be sure o clearly label your output so someone looking at it knows which sort was applied each time.
Expert Answer:
Answer rating: 100% (QA)
Lets break it down step by step Step 1 Create a new project named 1007 Assignment in your Module 10 Assignment folder This step typically involves using an Integrated Development Environment IDE like ... View the full answer
Related Book For
Introduction To Materials Management
ISBN: 978-9386873248
8th edition
Authors: Arnold J. R. Tony, Gatewood Ann K., M. Clive Lloyd N. Chapman Stephen
Posted Date:
Students also viewed these programming questions
-
5. If you were to connect an ammeter to measure current in the circuit at points A, B, and C how would the readings compare? (Do not connect ammeter yet) Explain the reasoning for your prediction....
-
This case study on project evaluation is applicable for beginning courses in corporate finance or finance strategy. Two alternative investment options are available to evaluate. Challenges are...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
With respect to strategies used by land conservation groups to preserve land, conservation easements seem to be expanding more rapidly than buying land for preservation. In what respect might...
-
Knowing that the tension in wire BD is 300 lb, determine the reaction at fixed support C for the frame shown. 180 Ib 6 in. 10 in. 20 in. 100 Ib 24 in. 16 in. D.
-
1. First organism to reach land were :- (1) Sea-weeds (2) Plants (3) Reptiles (4) Amphibia 2. The best evidence in support of organic evolutionare:- (1) Palaentological and evidences from...
-
What is the systems model of T&D? Discuss how HRIS T&D applications can assist in carrying out the steps in the systems model.
-
Glen Pool Club, Inc., has a $ 150,000 mortgage liability. The mortgage is payable in monthly installments of $ 1,543, which include interest computed at an annual rate of 12 percent (1 percent...
-
Bank Negara Malaysia would like to keep interest rates low, but the continuing Covid-19 endemic makes the outlook for the economy very uncertain and considering the pro and cons of taking Malaysia...
-
Use the dual simplex method to solve the following LP. -2x, max z = -X3 st. +X, -X3 > 5 -2x, +4x, > 8 X, X2, X3
-
Compound interest is one of the most important concepts to understand when managing your finances. It can help you earn a higher return on your savings and investments, but it can also work against...
-
How does the intricate interplay between neurotransmitter release, synaptic plasticity, and dendritic integration contribute to the dynamic modulation of neural circuits within the central nervous...
-
What are the molecular mechanisms underlying the formation and refinement of neural networks during embryonic development, and how do disruptions in these processes manifest as neurodevelopmental...
-
Define the non-bank financial institutions and how they relate to the financial markets?
-
Describe the role of the financial institutions and financial markets in our economy.
-
What are the major types of financial institutions and their role in the finance industry?
-
A 1.70-m tall person lifts a 2.50-kg book from theground so it is 2.40 m above the ground. Part A What is the potential energy of the book relative to theground? Express your answer to three...
-
A heat engine has a heat input of 3 Ã 104 Btu/h and a thermal efficiency of 40 percent. Calculate the power it will produce, in hp. Source 3 x 10 Btu/h 40% HE Sink
-
If the assets are $2,000,000 and liabilities are $1,600,000, what is the owners equity?
-
Given the following data, calculate the gross margin and the net income. Revenue = $3,000,000 Direct labor = $700,000 Direct material = $900,000 Factory overhead = $700,000 General and administrative...
-
Given the following data, can an order for 40 more units for delivery in week 5 be accepted? If not, what do you suggest can be done? There are zero units on hand. 5 2 3 6. 8. Week Customer Orders 70...
-
What is the difference between leading zeros and trailing zeros? Which ones are considered significant digits?
-
Explain the difference between number of digits, number of decimal places, and number of significant digits in a numerical value. Illustrate your explanation using the number 0.03720 .
-
What is the simplest way to convert a quantity given in one unit to the same quantity given in a different unit?
Study smarter with the SolutionInn App