Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 2 (30 MARKS) Given the following DriveThru and HomeVisit subclasses are inherited from Patient superclass. Attributes: string patientNumber; // patient I/C number string patientName;

QUESTION 2 (30 MARKS)

Given the following DriveThru and HomeVisit subclasses are inherited from Patient superclass.

Attributes:

string patientNumber; // patient I/C number

string patientName; // patient name

boolean member; // either patient are member or not member

string date; // date of Covid-19 screening test

: DriveThru

Attributes:

string driveThruType; // the patient must choose either fast or standard lane

final double fastLane = 250.00; // cost of screening using fast lane

final double standardLane = 150.00; // cost of screening using standard lane

: HomeVisit

Attributes:

boolean shahAlam;

boolean petaling;

boolean klang;

boolean subang;

final double shahAlam = 300.00; // total price for Shah Alam

final double petaling = 350.00; // total price for Petaling

final double klang = 330.00; // total price for Klang

final double subang = 340.00; // total price for Subang

Scenarios :

Suraya's Clinic Centre is offering two types of services of Covid-19 screening test, which are the drive

thru and home visit. Those patient who are the members of the clinic will be given a special discount

of 15%.

Write a complete program to calculate the total price should be paid by the patient depending on the

services. The program can capture the details of the patient and the services chosen by the patient

before calculate and display the total price

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

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions

Question

What is a bottleneck and how can you locate one?

Answered: 1 week ago