Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An airline allows passengers to carry different amounts of baggage, at no additional cost, depending on the class of ticket held by the passenger. There

An airline allows passengers to carry different amounts of baggage, at no additional cost, depending on the class of ticket held by the passenger. There are three types of ticket: passengers who have first class tickets are allowed up to 45kg, those who have business class tickets are allowed up to 35kg and those who have economy class tickets are allowed up to 20kg.

The program below should set a variable excess_baggage to the amount (positive, zero or negative) by which a customer has exceeded their baggage allowance.

The program is incomplete at the points labelled a, b and c. Select the code (in textual form) that should be inserted at each of these points.

Code:

BUSINESS_ALLOWANCE [ticket_class]=[1] [ticket_class]=[2] [ticket_class]=[3] FIRST_ALLOWANCE [bag_weight]-[BUSINESS_ALLOWANCE] [bag_weight]-[FIRST_ALLOWANCE] [bag_weight]-[ECONOMY_ALLOWANCE] ECONOMY_ALLOWANCE

image text in transcribed

a = ?

b = ?

c = ?

when fickiced set FIR5T_ALLOWANCE * to 45 set BUSINES5_ALLOWANCE * to 35 set ECONOMY_ALLOWANCE 7 to 20 when space 7 key pressed ask Enter ticket class ( 1 for first; 2 for business; 3 for economy) and wait set ticket_class - to answer) set excess_baggage * to bag_weight) - FIRST_ALLoWAKcE

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

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions