Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

COMSC 200 Final Exam Study Guide Complete Review Material 95 Questions and Answers.

Rating
-
Sold
-
Pages
65
Grade
A+
Uploaded on
21-05-2025
Written in
2024/2025

COMSC 200 Final Exam Study Guide Complete Review Material 95 Questions and Answers.

Institution
NCCER
Course
NCCER

Content preview

COMSC 200 Final Exam Study Guide Complete Revie @i @i @i @i @i @i @i




w Material 95 Questions and Answers
@i @i @i @i @i




Which of the following can be used to initialize an object when it is declared in an application program?
@i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i




A. Public Member Function
@i @i @i




B. Private Member Function
@i @i @i




C. Public Constructor
@i @i




D. Private Constructor -
@i @i @i @i




@i ✅ C. @i




The default constructor takes _ argument(s)
@i @i @i @i @i




a. zero (0)@i @i




b. two (2) @i @i




c. one (1)@i @i




d. three (3) -
@i @i @i @i




@i ✅ A. @i




Suppose there is a Class named Car, which has a member function named set_make that can be used to se
@i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i




t the make of a car object to a particular value (e.g. "Toyota", Ford", "Hyundai", etc.):
@i @i @i @i @i @i @i @i @i @i @i @i @i @i @i




NOTE: Access specifiers have been omitted here because there is another question on this quiz about the
@i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i




m.

class Car @i




{

string make; @i




void set_make(string m) @i @i




{ make = m; }
@i @i @i @i




string get_make() @i




{ return make; }
@i @i @i




};



Then in main we have the following code: @i @i @i @i @i @i @i

,int main @i




{

string value = "Toyota"; @i @i @i




Car car_obj; @i




................

return 0; @i




}



Which line of code could be inserted in main below the line Car car_obj; to call the set_make function for t
@i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i




he car_obj object with the argument "Toyota"?
@i @i @i @i @i @i




a. set_make(car_obj->value);
@i




b. car_obj->set_make(value);
@i




c. car_obj.set_make(value);
@i




d. set_make(car_obj.value); -
@i @i @i




@i ✅ C. @i




What is the default access specifier in a class?
@i @i @i @i @i @i @i @i




A. Global @i




B.Public

C.local @i




D. private -@i @i @i




@i ✅ D. @i




Which of the following is like a blueprint or template that you can use to create things from?
@i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i




a. funciton
@i




b. class
@i




c. constructor
@i




d. object -
@i @i @i




@i ✅ B. @i

,One of the concepts we learned about early in chapter 3 is data hiding. Which of the terms below refers to
@i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i




data hiding? @i




A. Polymorphism
@i




B. Instantiation
@i




C. Inheritance
@i




D. Encapsulation -
@i @i @i




@i ✅ D. @i




Suppose a program has the following class and main function: @i @i @i @i @i @i @i @i @i




NOTE: Access specifiers have been omitted here because there is another question on this quiz about the
@i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i




m.

class College @i




{

string name; @i




string get_name() @i




{ return name; }
@i @i @i




void set_name(string n) @i @i




{ name = n; }
@i @i @i @i




};

int main() @i




{

College college_obj; @i




return 0; @i




}

On which line in the above program would it be appropriate to insert the word "const" ?
@i @i @i @i @i @i @i @i @i @i @i @i @i @i @i @i




A.string get_name() @i




B. College college_obj;
@i @i




C. void set_name(string n)
@i @i @i




D. string name; -
@i @i @i @i




@i ✅ A. @i

, Which of the following can use a member initializer list?
@i @i @i @i @i @i @i @i @i




A. Get function
@i @i




B. Constructor
@i




C. Set function
@i @i




D. Object -
@i @i @i




@i ✅ B. @i




Another name for a get function in a class is what?
@i @i @i @i @i @i @i @i @i @i




A.Destructor

B. Mutator
@i




C. Constructor
@i




D.Accessor - @i @i




@i ✅ D. @i




In a UML diagram, which of the options below
@i @i @i @i @i @i @i @i




1) Describes a function that can be accessed anywhere -
@i @i @i @i @i @i @i @i @i




both inside of the class and outside of the class (such as in main)
@i @i @i @i @i @i @i @i @i @i @i @i @i @i




and

2) Returns an integer?
@i @i @i




A. +some_name(some_value: int)
@i @i




B. +some_name(): int
@i @i




C. -some_name(): int
@i @i




D. -some_name(some_value: int) -
@i @i @i @i




@i ✅ B. @i




Suppose a program has the following College class:
@i @i @i @i @i @i @i




class College @i




{

std::string college_name; @i

Written for

Institution
NCCER
Course
NCCER

Document information

Uploaded on
May 21, 2025
Number of pages
65
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$12.99
Get access to the full document:

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

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
academicmaster Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
772
Member since
6 year
Number of followers
676
Documents
5998
Last sold
3 weeks ago
MIDTERM & FINALS

Get all latest Quizzes, Test Banks, Midterm and Final Exams. Ace your Exams with My Papers Guaranteed to help you score A in everything.

3.9

111 reviews

5
60
4
16
3
16
2
7
1
12

Recently viewed by you

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