Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 nd 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 spaceseparated values in the format:
ItemName Category Quantity Pricein$
Example from the text file:
InteliK Processor
AMDRyzenX Processor
CorsairVengeanceGB Memory
Task
Please read and store the text file in your C project into a structure type array.
Task : Total Quantity of a Category
Ask from the user keyboard a category and give the total quantity of items in that category.
Task : Total Value of Inventory
Calculate and print out the total value of all items in the hardware inventory.
Task : Find the Most Expensive Item
Find and print out the most expensive item in the hardware inventory.
Task : Count Items Above a Certain Price
Count and print out the number of items with a price greater than $
Task : 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started