978-1337102087 Chapter 10

subject Type Homework Help
subject Pages 9
subject Words 1524
subject Authors D. S. Malik

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Name:
Class:
Date:
Copyright Cengage Learning. Powered by Cognero.
Page 1
1. A class is an example of a structured data type.
a.
True
b.
False
ANSWER:
True
POINTS:
1
REFERENCES:
652
QUESTION TYPE:
True / False
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
2. In C++, class is a reserved word and it defines only a data type.
a.
True
b.
False
ANSWER:
True
POINTS:
1
REFERENCES:
653
QUESTION TYPE:
True / False
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
3. If the heading of a member function of a class ends with the word const, then the function member cannot modify the
private member variables, but it can modify the public member variables.
a.
True
b.
False
ANSWER:
False
POINTS:
1
REFERENCES:
655
QUESTION TYPE:
True / False
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
4. In C++ terminology, a class object is the same as a class instance.
a.
True
b.
False
ANSWER:
True
POINTS:
1
REFERENCES:
656
QUESTION TYPE:
True / False
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
page-pf2
Name:
Class:
Date:
page-pf3
Name:
Class:
Date:
page-pf4
Name:
Class:
Date:
page-pf5
Name:
Class:
Date:
a.
public
b.
automatic
c.
private
d.
static
ANSWER:
c
POINTS:
1
REFERENCES:
654
QUESTION TYPE:
Multiple Choice
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
14. A class and its members can be described graphically using a notation known as the ____ notation.
a.
OON
b.
OOD
c.
UML
d.
OOP
ANSWER:
c
POINTS:
1
REFERENCES:
656
QUESTION TYPE:
Multiple Choice
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
page-pf6
Name:
Class:
Date:
Copyright Cengage Learning. Powered by Cognero.
Page 6
16. Consider the UML class diagram shown in the accompanying figure. Which of the following is the name of the class?
a.
clock
b.
clockType
c.
Type
d.
+clockType
ANSWER:
b
POINTS:
1
REFERENCES:
656
QUESTION TYPE:
Multiple Choice
HAS VARIABLES:
False
PREFACE NAME:
clockType definition
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
17. Consider the UML class diagram shown in the accompanying figure. According to the UML class diagram, how many
private members are in the class?
a.
none
b.
zero
c.
two
d.
three
ANSWER:
d
POINTS:
1
REFERENCES:
656
QUESTION TYPE:
Multiple Choice
HAS VARIABLES:
False
PREFACE NAME:
clockType definition
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
18. A ____ sign in front of a member name on a UML diagram indicates that this member is a public member.
a.
+
b.
-
c.
#
d.
$
ANSWER:
a
POINTS:
1
REFERENCES:
656
QUESTION TYPE:
Multiple Choice
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
19. A ____ sign in front of a member name on a UML diagram indicates that this member is a protected member.
a.
+
b.
-
c.
#
d.
$
ANSWER:
c
POINTS:
1
REFERENCES:
656
page-pf7
Name:
Class:
Date:
page-pf8
Name:
Class:
Date:
page-pf9
Name:
Class:
Date:
page-pfa
Name:
Class:
Date:
c.
constructor
d.
destructor
ANSWER:
a
POINTS:
1
REFERENCES:
666
QUESTION TYPE:
Multiple Choice
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
29. To guarantee that the member variables of a class are initialized, you use ____.
a.
accessors
b.
mutators
c.
constructors
d.
destructor
ANSWER:
c
POINTS:
1
REFERENCES:
671
QUESTION TYPE:
Multiple Choice
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
page-pfb
Name:
Class:
Date:
page-pfc
Name:
Class:
Date:
Copyright Cengage Learning. Powered by Cognero.
Page 12
33. What does ADT stand for?
a.
abstract definition type
b.
asynchronous data transfer
c.
abstract data type
d.
alternative definition type
ANSWER:
c
POINTS:
1
REFERENCES:
682
QUESTION TYPE:
Multiple Choice
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
34. Which of the following is true about classes and structs?
a.
By default, all members of a struct are public and all members of a class are private.
b.
A struct variable is passed by value only, and a class variable is passed by reference only.
c.
An assignment operator is allowed on class variables, but not on struct variables.
d.
You cannot use the member access specifier private in a struct.
ANSWER:
a
POINTS:
1
REFERENCES:
685
QUESTION TYPE:
Multiple Choice
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
35. If a function of a class is static, it is declared in the class definition using the keyword static in its ____.
a.
return type
b.
parameters
c.
heading
d.
main function
ANSWER:
c
POINTS:
1
REFERENCES:
701
QUESTION TYPE:
Multiple Choice
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
DATE MODIFIED:
10/5/2016 1:41 PM
36. With ____________________ functions, the definitions of the member functions are placed in the implementations
file.
ANSWER:
inline
POINTS:
1
REFERENCES:
700
QUESTION TYPE:
Completion
HAS VARIABLES:
False
DATE CREATED:
10/5/2016 1:41 PM
page-pfd
Name:
Class:
Date:
page-pfe
Name:
Class:
Date:

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.