CISC 3115
Introduction to Modern Programming Techniques
Inheritance

How to Develop and Submit your Labs

Lab 7.1 — An Extended Phone Number Class (ExtendedPhoneNumber)

Overview

Create a subclass of the PhoneNumber class of Lab 4 named ExtendedPhoneNumber. The subclass should add a description (String) for the phone number, e.g., "mobile", "home", etc (the description is arbitrary.

Implementation Details

In addition to the instance variable, you should have: Here is the expected output:
phone number: mobile: (550)831-9463
description: mobile
area code: 550
exchange: 831
line number: 9463
is toll free: false

phone number: home: (775)087-0947
description: home
area code: 775
exchange: 087
line number: 0947
is toll free: false

phone number: work: (766)294-2999
description: work
area code: 766
exchange: 294
line number: 2999
is toll free: false

phone number: other: (342)775-1584
description: other
area code: 342
exchange: 775
line number: 1584
is toll free: false

---
4 phone numbers processed.

Submitting to CodeLab

Lab 7.2 — Fun With Polymorphism (ExtendedPhoneNumberApp)

Overview

Given the ExtendedPhoneNumber (and PhoneNumber) classes of the previous lab, code the following app: Here is the expected output:
mobile: (550)831-9463
home: (775)087-0947
work: (766)294-2999
other: (342)775-1584

(718)123-4567
(347)987-6543

Before sorting: {mobile: (550)831-9463, home: (775)087-0947, work: (766)294-2999, other: (342)775-1584, (718)123-4567, (347)987-6543}


After sorting: {other: (342)775-1584, (347)987-6543, mobile: (550)831-9463, (718)123-4567, work: (766)294-2999, home: (775)087-0947}
I've provided the sample input files as well as the expected out here as well. If you develop in your IDE, use your own ExtendedPhoneNumber class from the previous lab.
Notes

Submitting to CodeLab

Files Relevant to This Lab