• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

ISDS 505 Final Ch 10 Question ans answers 100% solved.

Document preview thumbnail
Preview 2 out of 6 pages

Specific types of objects assume features of more general classes through ____________________. a. polymorphism b. inheritance c. encapsulation d. structure - Answer- b. inheritance Which of the following is not a benefit of using inheritance when creating a new class? a. You save computer memory because when you create objects of the new class, storage is not required for parent class fields b. You reduce the chance of errors, because the parent class methods have already been used and tested. c. You make it easier for anyone who has used the parent class to understand the new class because the programmer can concentrate on the new features. d. You save time, because you need not create fields and methods that already exist in a parent class. - Answer- a. You save computer memory because when you create objects of the new class, storage is not required for parent class fields A child class is also called a(n) ____________________ . a. extended class b. base class c. superclass d. delineated class - Answer- a. extended class Assuming that the following classes are well named, which of the following is a parent class of House? a. Apartment b. VictorianHouse c. Building d. myHouse - Answer- c. Building A derived class usually contains ____________________ than its parent. a. more fields and methods b. the same number of fields but fewer methods c. fewer fields but more methods d. fewer fields and methods - Answer- a. more fields and methods When you create a class that is an extension or child of another class, you use a(n) ____________________ between the derived class name and its base class name. a. ampersand b. hyphen c. dot d. colon - Answer- d. colon A base class named Garden contains a private field width and a property public int Width that contains get and set accessors. A child class named VegetableGarden does not contain a Width property. When you write a class in which you declare an object as follows, what statement can you use to access the VegetableGarden's width? a. VegetableGarden myGarden = new VegetableGarden(); b. myGarden.Width c. myG.Width d. VegetableGarden.Width e. You cannot use Width with a VegetableGarden object. - Answer- b. myGarden.Width When a parent class contains a private data field, the field is ____________________ the child class. a. hidden in b. not a member of c. directly accessible in d. public in - Answer- a. hidden in When a base class and a derived class contain a method with the same name and parameter list, and you call the method using a derived class object, ____________________. a. you receive an error message b. the base class version overrides the derived class version c. the derived class version overrides the base class version d. both method versions execute - Answer- c. the derived class version overrides the base


Document information

Uploaded on
March 18, 2024
Number of pages
6
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$10.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
2
Followers
1
Items
268
Last sold
2 year ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.