expand icon
book Programming Logic and Design, Introductory 7th Edition by Joyce Farrell cover

Programming Logic and Design, Introductory 7th Edition by Joyce Farrell

النسخة 7الرقم المعياري الدولي: 1285225562
book Programming Logic and Design, Introductory 7th Edition by Joyce Farrell cover

Programming Logic and Design, Introductory 7th Edition by Joyce Farrell

النسخة 7الرقم المعياري الدولي: 1285225562
تمرين 9

The Drive-Rite Insurance Company provides automobile insurance policies for drivers. Design a flowchart or pseudocode for the following:

a. A program that accepts insurance policy data, including a policy number, customer last name, customer first name, age, premium due date (month, day, and year), and number of driver accidents in the last three years. If an entered policy number is not between 1000 and 9999 inclusive, set the policy number to 0. If the month is not between 1 and 12 inclusive, or the day is not correct for the month (for example, not between 1 and 31 for January or 1 and 29 for February), set the month, day, and year to 0. Display the policy data after any revisions have been made.

b. A program that continuously accepts policy holders’ data until a sentinel value has been entered, and displays the data for any policy holder over 35 years old.

c. A program that accepts policy holders’ data and displays the data for any policy holder who is at least 21 years old.

d. A program that accepts policy holders’ data and displays the data for any policy holder no more than 30 years old.

e. A program that accepts policy holders’ data and displays the data for any policy holder whose premium is due no later than March 15 any year.

f. A program that accepts policy holders’ data and displays the data for any policy holder whose premium is due up to and including January 1, 2014.

g. A program that accepts policy holders’ data and displays the data for any policy holder whose premium is due by April 27, 2013.

h. A program that accepts policy holders’ data and displays the data for anyone who has a policy number between 1000 and 4000 inclusive, whose policy comes due in April or May of any year, and who has had fewer than three accidents.

الحلول خطوة بخطوة
موثّق
like image
like image

الخطوة 1 من59

a)

Pseudo code:

The following is the required pseudo code to read the insurance policy data such as policy number, customer last name, first name, age, premium due date and number of driver accidents in the last three years. It displays the data after validating the policy number and date.

start

Declarations

num policyNumber

string customerLastName

string customerFirstName

num age

num dueMonth

num dueDay

num dueYear

num accidentsNumber

num tmpMonth

readData()

displayData()

stop


الخطوة 2 من 59


الخطوة 3 من 59


الخطوة 4 من 59


الخطوة 5 من 59


الخطوة 6 من 59


الخطوة 7 من 59


الخطوة 8 من 59


الخطوة 9 من 59


الخطوة 10 من 59


الخطوة 11 من 59


الخطوة 12 من 59


الخطوة 13 من 59


الخطوة 14 من 59


الخطوة 15 من 59


الخطوة 16 من 59


الخطوة 17 من 59


الخطوة 18 من 59


الخطوة 19 من 59


الخطوة 20 من 59


الخطوة 21 من 59


الخطوة 22 من 59


الخطوة 23 من 59


الخطوة 24 من 59


الخطوة 25 من 59


الخطوة 26 من 59


الخطوة 27 من 59


الخطوة 28 من 59


الخطوة 29 من 59


الخطوة 30 من 59


الخطوة 31 من 59


الخطوة 32 من 59


الخطوة 33 من 59


الخطوة 34 من 59


الخطوة 35 من 59


الخطوة 36 من 59


الخطوة 37 من 59


الخطوة 38 من 59


الخطوة 39 من 59


الخطوة 40 من 59


الخطوة 41 من 59


الخطوة 42 من 59


الخطوة 43 من 59


الخطوة 44 من 59


الخطوة 45 من 59


الخطوة 46 من 59


الخطوة 47 من 59


الخطوة 48 من 59


الخطوة 49 من 59


الخطوة 50 من 59


الخطوة 51 من 59


الخطوة 52 من 59


الخطوة 53 من 59


الخطوة 54 من 59


الخطوة 55 من 59


الخطوة 56 من 59


الخطوة 57 من 59


الخطوة 58 من 59


الخطوة 59 من 59

close menu
Programming Logic and Design, Introductory 7th Edition by Joyce Farrell
cross icon