Category Item code Phone BPCM Phone BPSH Phone RPSS Phone RPLL Phone YPLS Phone YPLL Tablet RTMS Tablet RTML Tablet YTLM Tablet YTLL SIM card SMNO SIM card SMPG Case CSST Case CSLX Charger CGCR Charger CGHM Description Compact Clam shell Robo phone - 5inch 64GB memory Robo phone - 6inch 256GB memory Y-phone standard 6 inch 64GB memory Y-phone deluxe 6 inch 256GB memory RoboTab - 8 inch screen 64GB memory RoboTab 10 inch screen 128GB memory Y-tab standard - 10 inch screen 128GB memory Y-tab deluxe - 10 inch screen 256GB memory Sim free (no SIM card) Pay as you go (with SIM card) Standard Luxury Car Home Price (S) 29.99 49.99 199.99 499.99 549.99 649.99 149.99 299.99 499.99 599.99 0.00 9.99 0.00 50.00 19.99 15.99
Task:
A shop sells a range of mobile devices, SIM cards and accessories as shown in the table (see screenshot):
Write a program
- Your program or programs must include appropriate prompts for the entry of data; data must be validated on entry.
- Error messages and other output need to be set out clearly and understandably.
- All arrays, variables, constants and other identifiers must have meaningful names.
You will need to complete these three tasks.
Task 1 – Setting up the system.
Write a program to:
- use appropriate data structures to store the item code, description and price information for the mobile devices, SIM cards and accessories;
- allow the customer to choose a specific phone or tablet;
- allow phone customers to choose whether the phone will be SIM Free or Pay As You Go;
- allow the customer to choose a standard or luxury case;
- allow the customer to choose the chargers required (none, one or both may be purchased);
- calculate the total price of this transaction;
- output a list of the items purchased and the total price.
Task 2 – Allow a customer to order multiple mobile devices.
Extend Task 1 to:
- offer the customer the opportunity to purchase an additional mobile device;
- if required, perform bulleted steps 2 to 7 of Task 1 for each additional mobile device and calculate a running total for the customer;
- once no further devices are required, output the total the customer will need to pay.
Task 3 – Offering discounts.
Extend the program to allow a discount of 10% off the price of every additional phone or tablet purchased. Output the new total the customer will need to pay and the amount of money saved.
![Category Item code
Phone
BPCM
Phone
BPSH
Phone
RPSS
Phone
RPLL
Phone
YPLS
Phone
YPLL
Tablet
RTMS
Tablet
RTML
Tablet
YTLM
Tablet
YTLL
SIM card
SMNO
SIM card
SMPG
Case
CSST
Case
CSLX
Charger
CGCR
Charger CGHM
Description
Compact
Clam shell
Robo phone - 5inch 64GB memory
Robo phone - 6inch 256GB memory
Y-phone standard 6 inch 64GB memory
Y-phone deluxe 6 inch 256GB memory
RoboTab - 8 inch screen 64GB memory
RoboTab 10 inch screen 128GB memory
Y-tab standard - 10 inch screen 128GB memory
Y-tab deluxe - 10 inch screen 256GB memory
Sim free (no SIM card)
Pay as you go (with SIM card)
Standard
Luxury
Car
Home
Price (S)
29.99
49.99
199.99
499.99
549.99
649.99
149.99
299.99
499.99
599.99
0.00
9.99
0.00
50.00
19.99
15.99](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F56206b62-8dca-4914-b3b3-44350634de09%2F8ac30f8a-1880-42d3-a0ce-f2e0ef34cad2%2Ftar47nc_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
The Offering discounts is not added to the code
Task 3 – Offering discounts.
Extend the program to allow a discount of 10% off the price of every additional phone or tablet purchased. Output the new total the customer will need to pay and the amount of money saved.
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)