Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSE 1321L: Programming and Problem Solving I Lab Assignment 3-100 points Selection Structures Proaram 1: Design (peeudocode) and implement (source code) a program (name it

image text in transcribed
CSE 1321L: Programming and Problem Solving I Lab Assignment 3-100 points Selection Structures Proaram 1: Design (peeudocode) and implement (source code) a program (name it PhoneB:11) calculates the bill for a cellular belephone company. The company offers two types of service: regular servicer and premium service. The rates vary depending on the type of service. The rates are computed as follows Rea lacene $150 fee covering first 50 minutes. Carges at the rate of $0.50 per minute. over 50 minites are computed Premisum service $25.00 fee plus a. For daytime calls (between 6.00AM to 6.00PM, the first 50 minutes are free, charges b. For nighttime calls (between 8:00PM to 6:00AM), the first 100 minutes are free; charges for over 50 minutes are computed at the rate of $0.20 per minute. for over 100 minutes are computed at the rate of 0.10 per minute. The program prompts the user to enter an account number, a service code (of type char), and the number of minutes the service was used. A service code r (or R) means regular service; while code p (or P) means premium service. may be and night. Therefore, the program must ask the user to input the number of minutes used during daytime and nighttime in separate prompts Document your code and property label the input prompts and the outputs as shown below Sample run i Account Number: 12345 Regular 50 $15.00 Service type: Total ninutes: Amount due: Account Number: Service type: Daytine ninutes: Nighttime minutes: Amount due: 32145 Premium 40 200 35.00 Sample run 3 Account Number: Service type: Daytime minutes: Nighttime ninutes: 78654 Premiun 120 $29.00 Amount due: Page 1 of 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

Students also viewed these Databases questions

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago

Question

What is Ohm's law and also tell about Snell's law?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago