You are required to do multithreading on generated receipt. You will create 5 threads. Thread 1: select the number of items you purchased. Display the prices of all items as (Quantity x Price of the individual) add them, and return their sum.
Thread 3: Calculate 8% tax on it.
Thread 4: If an order is greater than 250, Calculate 10% sale. Thread 5: Sort the items according to their prices.
Output: Thread 1: Items Purchased = eggs, bread, chocolate
eggs = 3 x 15=45 , bread = 1x 60 =60 , chocolate = 5 x 50 = 250, sum=45+60+250= 355 Thread 2 : 355/(1+0.8) = 197.22 , taxed sum=197.22+355= 552.33
Thread 3 : price=355 , sale =0.1 , 355*0.1=35.5 , 355-35.5 = 319.5
Thread 4:
Items Price
Chocolates 250
Bread 60
Eggs 45
It's C or C++
QUESTION NO. 01: You are required to do multithreading on generated receipt. You will create 5 threads. Thread 1: select the number of items you purchased. Display the prices of all items as (Quantity x Price of the individual) add them, and return their sum. Thread 3: Calculate 8% tax on it. Thread 4: If an order is greater than 250, Calculate 10% sale. Thread 5: Sort the items according to their prices. Output: Thread 1: Items Purchased = eggs, bread, chocolate eggs = 3 x 15-45, bread = 1x 60 =60, chocolate = 5 x 50 = 250, sum=45+60+250=355 Thread 2: 355/(1+0.8)= 197.22 , taxed sum=197.22+355= 552.33 Thread 3 : price=355, sale =0.1, 355*0.1=35.5, 355-35.5 = 319.5 Thread 4: Items Price Chocolates 250 Bread 60 eggs 45
You are required to do multithreading on generated receipt. You will create 5 threads. Thread 1: select the number of it
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
You are required to do multithreading on generated receipt. You will create 5 threads. Thread 1: select the number of it
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!