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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Task:

A shop sells a range of mobile devices, SIM cards and accessories as shown in the table (see screenshot):

Write a program algorithm for this shop.

- 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
Transcribed Image Text: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
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

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.

 

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Windows
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education