• 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 9 question and answers graded A+

Document preview thumbnail
Preview 2 out of 6 pages

An object is a(n) ________________________ of a class. a. instantiation b. institution c. child d. relative - Answer- a. instantiation A class header or class definition can contain all of the following except ________________________. a. an optional access modifier b. the keyword class c. an identifier d. initial field values - Answer- d. initial field values Most fields in a class are created with the ________________________ modifier. a. public b. private c. new d. protected - Answer- b. private Most methods in a class are created with the ________________________ modifier. a. public b. private c. new d. protected - Answer- a. public Instance methods that belong to individual objects are ________________________ static methods. a. always b. usually c. occasionally d. never - Answer- d. never To allocate memory for an object instantiation, you must use the ________________________ operator. a. mem b. alloc c. instant d. new - Answer- d. new Assume that you have created a class named MyClass. The header of the MyClass constructor can be ________________________. a. public void MyClass() b. public MyClassConstructor() c. Either of these can be the constructor header. d. Neither of these can be the constructor header. - Answer- d. Neither of these can be the constructor header. Assume that you have created a class named MyClass. The header of the MyClass constructor can be ________________________. a. public MyClass() b. public MyClass(double d) c. Either of these can be the constructor header. d. Neither of these can be the constructor header. - Answer- c. Either of these can be the constructor header. Assume that you have created a class named DemoCar. Within the Main() method of this class, you instantiate a Car object named myCar and the following statement executes correctly: WriteLine("The Car gets {0} miles per gallon", myCar.ComputeMpg()); Within the Car class, the ComputeMpg() method can be ________________________. a. public and static b. public and nonstatic c. private and static d. private and nonstatic - Answer- b. public and nonstatic


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.