By using ADT, write a C++ program which implements a linked list that manages library books. A book is characterized by (author, price, unique ISBN number). It allows user to do one of the following:
1. Build a book list by adding book information until the user enters -1.
2. Print the details of a specific book by using ISBN number.
3. Change the price of all books that are higher than 100 SR by giving a 25% discount.
- As the question said by using ADT ,you can only use the public functions in the class List.
- Book data type is implemented as struct:
int Key;//note that int ISBN; is incorrect
You are asked to write a C++ program to model a shop that sells three types of laptops. The shop has decided to keep its laptop records in a linked list. Each laptop is characterized by an identifying number, type, quantity and price.
(the quantity would be 0 if currently there is not any one available of this type)
The company keeps its laptops in an ordered list.
Laptop Model Number (Key) Type Quantatiy Price
111 Toshiba 20 3000
222 IBM 30 4000
333 Sony 40 5000
First of all, download the ADT of linked list from the blackboard to include it in your cpp file. Then, given the code at the end do the following:
• Using ADT, implement and test the following two functions:
This function should return the total price that the shop would get from selling all the currently available quantity of a given laptop identifying number. Test your function to return 120000 if you send the key 222 as a parameter .
This function should print the details of laptops
The code to start your program is available below.
// #include "……. .h"
using namespace std;
// getTotalPriceFunction code should be here
// PrintLaptopsInfo function code should be here
//Create the list with the name :laptops