Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 6. 6. (TCO 2) Which of the following statements is/are true? (Points : 5) A. A private (helper) method can only be used inside

Question 6. 6. (TCO 2) Which of the following statements is/are true? (Points : 5)

A. A private (helper) method can only be used inside the class. It cannot be called through an object of the class. B. The programmer can control the scope of a data member of a class using access specifiers. C. Perhaps the most important consideration when designing a class is identifying the audience, or users, of the class. All of the above Only A and C

Question 7. 7. (TCO 2) You are given a Shape class that was designed with the concept of a black box in mind. You need to integrate the Shape class into your own code. Which of the following statements are true? (Points : 5)
You need to analyze each method's implementation that you plan to use in order to understand it thoroughly. You need to figure out the inputs and outputs that are associated with the class. You may have to modify the internal processing to meet the needs of your specific class. Without a properly constructed UML diagram you cannot be sure how the new class will integrate with your code.
Question 8. 8. (TCO 2) A class is designed with three public attributes: attributeOne, attributeTwo and attributeThree. attributeOne is an integer data type, attributeTwo is a double data type and attributeThree is a string data type. Which pseudocode representation(s) of getters would be appropriate for this class? (Points : 5)
int getAttributeOne() { return attributeOne } string getAttributeTwo() { return attributeTwo } int getAttributeThree(int newAttributeThree) { attributeThree = newAttributeThree } void getAttributeTwo() { return attributeOne } Both A and D None of the above
Question 9. 9. (TCO 2) You need to design an EntertainmentSystem class. How can you utilize the concept of encapsulation to design this class? (Points : 5)
Create at least one derived subclass of EntertainmentSystem which expands upon its functionality Create a Speaker class and a Screen class and integrate them into EntertainmentSystem using aggregation Design the class to include generic attributes and generic methods that are common to all EntertainmentSystem objects None of the above All of the above
Question 10. 10. (TCO 7) How is the pure virtual function different from a regular function? (Points : 5)
It can only be declared in an abstract class. It is declared with =0 at the end of the function signature. It does not contain function implementation. All of the above
Question 11. 11. (TCO 7) What is an abstract class? (Points : 5)
A generalized class used only to create related derived classes A class without any superclasses A class from which we create many instances Any subclass with more than one superclass
Question 12. 12. (TCO 7) Programmers may be forced to adhere to a contract or a specification defined by a framework due to the use of _____. (Points : 5)
abstract classes base classes is-a relationships None of the above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago