[A] Programming Exercise 1-1 through 1-5

Ace your homework & exams now with Quizwiz!

Name at least three attributes that might be appropriate for each of the following classes: a. RealEstateListing b. Vacation c. CreditCardBill

a. RealEstateListing - [Name] name of the listing - [ListingLocation] location - [ListingSN] serial number of listing b. Vacation - [VacationDestination] name of the destination - [VacTotal] total cost of the vacation - [NumOfAttendants] total number of people going on vacation c. CreditCardBill - [CardNumber] credit card number - [BillTotal] the total amount of the bill - [InvoiceNumber] unique identification number for that bill

Name at least three real-life objects that are instances of each of the following classes: a. Song b. CollegeCourse c. Musician

a. Song objects: skinticket, cherrywaves, necronomicon b. CollegeCourse objects: ComputerScience, Astronomy, English c. Musician objects: Bones, Slipknot, YvesTumor

Is each of the following class identifiers (a) legal and conventional, (b) legal but unconventional, or (c) illegal? a. myClass b. void c. Golden Retriever d. invoice# e. 36542ZipCode f. Apartment g. Fruit h. 8888 i. displayTotal() j. Accounts_Receivable

a. legal but unconventional b. illegal c. illegal d. illegal e. illegal f. legal and conventional g. legal and conventional h. illegal i. legal but unconventional j. legal but unconventional

Is each of the following method identifiers (a) legal and conventional, (b) legal but unconventional, or (c) illegal? a. associationRules() b. void() c. Golden Retriever() d. invoice#() e. 36542ZipCode() f. PayrollApp() g. getReady() h. 911() i. displayTotal() j. Accounts_Receivable()

a. legal but unconventional b. illegal c. illegal d. illegal e. illegal f. legal and conventional g. legal and unconventional h. illegal i. legal and unconventional j. legal and unconventional

Name at least three classes to which each of these objects might belong: a. myGrandmothersBrooch b. eggsBenedict c. cookieMonster

a. myGrandmothersBrooch - Brooch, FamilyHeirloom, GrandMother b. eggsBenedict classes: Breakfast, Recipes, Eggs c. cookieMonster classes: Muppets, SesameStreet, BlueMonsters


Related study sets

Spectacle lens aberrations, asperics, and atorics

View Set

2: Frequency Distributions, Percentiles, and Percentile Ranks

View Set

Test One Practice psych questions

View Set

PEDS Ch. 12 EAQs: Health Promotion of Toddler & Family

View Set