Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please provide full solution. I need this soon. Thank you ahead of time! Please do the programming exercise 2 at the end of Chapter 10.

Please provide full solution. I need this soon. Thank you ahead of time!image text in transcribed

image text in transcribed

Please do the programming exercise 2 at the end of Chapter 10. You can find a scanned image of the problem below To help you start, please follow these steps Step 1: define a skeleton class with required methods Step 2: define seven vectors Step 3: read input from either Scanner obiect or file. You can refer to coding in ch10 program1.iava, ch10 program1 2.iava, ch10 program1 3.java for how to read one line and process it into several values. You can also see how to use vectors in those coding Step 4: define print method using Formatter class. You can refer to coding in formatExample.java, or printfExample.java for how to use Formatter class Step 5: define sorting method. Programming Exercises 649 OGRAMMING EXERCISES 1. Redo Programming Exercise 8 in Chapter 9 so that students' names and their test scores are stored in Vector objects. (Assume that you do not know the number of stu- dents in the class.) 2. Write a program to keep track of a hardware store's inventory. The store sells various items. For each item in the store, the following information is kept: item ID, item name, number of pieces ordered, number of pieces currently in the store, number of pieces sold, manufacturer's price of the item, and the store's selling price. At the end of each week, the store manager wants to see a report in the following form: Friendly Hardware Store itemID itemName 1111 Circular Saw 2222 Cooking Range pordered pInStore pSold manufPrice sellingPrice 150 50 110 30 40 20 45.00 450.00 125.00 850.00 Total number of items in the store: The total inventory is the total selling value of all the items currently in the store. The total number of items is the sum of the number of Your program must be menu driven, giving the user various choices such as: Check whether an item is in the store, sell an item, and print the report. After inputting the data, sort it according to the items' names. Also, after an item is sold, update the appro- priate counts Initially, the number of pieces (of an item) in the store is the same as the number of pieces ordered, and the number of pieces of an item sold is zero. Input to the program is a file consisting of data in the following form: itemID itemName pordered manufPrice sellingPrice pieces of all the items in the store. 10 Use seven parallel vectors to store the information.The program must contain at least the following methods-a method to input the data into the vectors, a method to dis- play the menu, a method to sell an item, and a method to print the report for the man- ager. After inputting the data, sort it according to the items'names. Please do the programming exercise 2 at the end of Chapter 10. You can find a scanned image of the problem below To help you start, please follow these steps Step 1: define a skeleton class with required methods Step 2: define seven vectors Step 3: read input from either Scanner obiect or file. You can refer to coding in ch10 program1.iava, ch10 program1 2.iava, ch10 program1 3.java for how to read one line and process it into several values. You can also see how to use vectors in those coding Step 4: define print method using Formatter class. You can refer to coding in formatExample.java, or printfExample.java for how to use Formatter class Step 5: define sorting method. Programming Exercises 649 OGRAMMING EXERCISES 1. Redo Programming Exercise 8 in Chapter 9 so that students' names and their test scores are stored in Vector objects. (Assume that you do not know the number of stu- dents in the class.) 2. Write a program to keep track of a hardware store's inventory. The store sells various items. For each item in the store, the following information is kept: item ID, item name, number of pieces ordered, number of pieces currently in the store, number of pieces sold, manufacturer's price of the item, and the store's selling price. At the end of each week, the store manager wants to see a report in the following form: Friendly Hardware Store itemID itemName 1111 Circular Saw 2222 Cooking Range pordered pInStore pSold manufPrice sellingPrice 150 50 110 30 40 20 45.00 450.00 125.00 850.00 Total number of items in the store: The total inventory is the total selling value of all the items currently in the store. The total number of items is the sum of the number of Your program must be menu driven, giving the user various choices such as: Check whether an item is in the store, sell an item, and print the report. After inputting the data, sort it according to the items' names. Also, after an item is sold, update the appro- priate counts Initially, the number of pieces (of an item) in the store is the same as the number of pieces ordered, and the number of pieces of an item sold is zero. Input to the program is a file consisting of data in the following form: itemID itemName pordered manufPrice sellingPrice pieces of all the items in the store. 10 Use seven parallel vectors to store the information.The program must contain at least the following methods-a method to input the data into the vectors, a method to dis- play the menu, a method to sell an item, and a method to print the report for the man- ager. After inputting the data, sort it according to the items'names

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

2. What should an employer do when facing an OSHA inspection?

Answered: 1 week ago