Question: Algorithms and Data Structure 2 nd Practical Exam Computer Hardware Inventory Management In the following tasks you have to solve some problems in a computer

Algorithms and Data Structure 2nd Practical Exam
Computer Hardware Inventory Management
In the following tasks you have to solve some problems in a computer hardware inventory.
The input file is inventory.txt which contains the items and the datas about the items.
The first line contains the number of lines. Please read in it separetely.
From the second line each line in the file contains space-separated values in the format:
ItemName > Category > Quantity > Price_in_$ >
Example from the text file:
Intel_i7_9700K Processor 10320.0
AMD_Ryzen_9_3900X Processor 8410.0
Corsair_Vengeance_16GB Memory 5075.0
Task 1
Please read and store the text file in your C++ project into a structure type array.
Task 2: Total Quantity of a Category
Ask from the user (keyboard) a category and give the total quantity of items in that category.
Task 3: Total Value of Inventory
Calculate and print out the total value of all items in the hardware inventory.
Task 4: Find the Most Expensive Item
Find and print out the most expensive item in the hardware inventory.
Task 5: Count Items Above a Certain Price
Count and print out the number of items with a price greater than $300.
Task 6: Sort Items by Price
Sort the items in the inventory by price in ascending order and print out the sorted items.
Please make sure that your code is syntactically correct. If you submit it with syntactical errors your exam is fail.
 Algorithms and Data Structure 2nd Practical Exam Computer Hardware Inventory Management

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!