CIS247 Week 8 – Study Material for Finals – 15 MCQs,7 Essay Questions – Guaranteed 100% score

Lab Price = $20
Please feel free to send us your queries at: [email protected]
Payment Methods

Add to Cart

Buy Now

View Cart

Problem Statement
1. (TCO 1) Object-oriented programming does not generally focus on _____. (Points : 5)
A. data abstraction.
B. cutting down on the lines of code.
C. client side access to implementation details.
D. information hiding.
All of the above
None of the above
Only B and C

2. (TCO 2) Which of the following components of a class definition can be overloaded? (Points : 5)
Static data members
All of the above
None of the above

3. (TCO 5) Which of the following method pairs are examples of method overloading? (Points : 5)
A. public void Dance() ; public int Dance(int x)
B. public int Walk(int x, int y) ; public void Walk(int x, int y, int z)
C. public int Jump(int x, int y) ; public int Jump(int y, int x)
All of the above
Only A and B

4. (TCO 1) Which of the following statements is/are true? (Points : 5)
Abstraction is the process of ignoring the unimportant details about a category entity or activity, while concentrating on the high level information.
Abstraction is the basic concept of the object-oriented paradigm.
Objects are created during program execution and eventually destroyed.
All of the above

5. (TCO 1) Which of the following would be the most appropriate choice for a method in a Cup class? (Points : 5)

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 outside of the class, through an object of that class.
B. The programmer can control the scope of a data member of a class using access specifiers.
C. An important consideration when designing a class is identifying the audience, or users, of the class.
All of the above
Only A and C

7. (TCO 4) Which of the following terms can be used to describe inheritance relationships between classes? (Points : 5)
All of the above

8. (TCO 4) A Car class, Civic, and Driver class have what type of relationships? (Points : 5)
The Driver has a Civic, and the Civic is a Car.
The Driver has a Civic, and the Car is a Civic.
The Driver has a Car, and the Civic is a Car
The Driver uses a Car, and the Car is a Civic.

9. (TCO3) Which of the following might be potential class(es) in an application? (Points : 5)
All of the above
None of the above

10. (TCO3) What happens right after the identification of classes in the object oriented design process? (Points : 5)
Determining the class responsibilities
Determining class interaction
Creating UML diagram
Developing SOW

11. (TCO 4) Which of the following is true about an inheritance hierarchy? (Points : 5)
It is not a good practice to have deeply layered inheritance hierarchies.
When inheritance hierarchy is too deep, it is easy to lose track of the members in the great-grandchildren classes.
Inheritance hierarchies are easier to implement than to design.
All of the above
None of the above

12. (TCO 6) _____ is the ability to use the same expression to denote different implementation depending on the type of object calling the expression. (Points : 5)

13. (TCO 2) What parts of a class, designed as a black box system, should not be exposed to future programmers? (Points : 5)

14. (TCO 2) Given a private attribute called species, which of the following are proper pseudocode implementations for a getter and a setter? (Points : 5)
void GetSpecies(){return species}
void SetSpecies(string newSpecies){ species = newSpecies }
string GetSpecies (){return species }
string SetSpecies (string newSpecies){return newSpecies }
string GetSpecies (){species = newSpecies }
void SetSpecies (string newSpecies){return species }
string GetSpecies (){return species }
void SetSpecies (string newSpecies){ species = newSpecies}

15. (TCO 2) You have been tasked to create an EntertainmentSystem class and your boss wants you to consider the concept of encapsulation as you design your class. Which of the following actions will you take? (Points : 5)
Declare a single no-arg constructor in order to prevent outside entities from initializing the state of a new EntertainmentSystem object.
Combine attributes and behaviors specific to an EntertainmentSystem together into one cohesive unit.
Declare the class as static so that only one instance of an EntertainmentSystem can be used at a time.
Declare the class as private.
All of the above

1. Design a class named Fan to represent a fan. The class contains:

an int data field named speed that specifies the speed of the fan. A fan has three speeds indicated with a value 1, 2, 3.

A bool data field named on that specifies whether the fan is on.

A double data field named radius that specifies the radius of the fan.

A no-arg constructor that creates a default fan with speed = 1, on = false and radius = 10

The accessor and mutator functions for all the data fields.

NOTE: JUST CREATE fan.h and fan.cpp – no need to create the main.cpp – I just want to see the design of the class. (Points : 18)

2. Create a class called person that can hold a person’s name and age – also use dateType from class exercises to hold the person’s birthday in the person class.

Create the necessary attributes, accessor and mutator methods, a print function, and a constructor WITH arguments

Note: Create the class person.h and person.cpp only – you don’t need the main.cpp

Note: You do not need to include the dateType class in your answer just show me how you would use an object of the dateType class in your person class. (Points : 18)

3. Create a class called Child that inherits from the person class from the previous question.

Aside from entering a child’s name, age and bithday using the person class.

The Child class should allow for entering what grade the child is in and the child’s gender.

Create the necessary attributes, accessors, mutators, print function, and a constructor WITH arguments.

Note: Just create the child.h and child.cpp files, not the main.cpp (Points : 18)
3. Create a class called parent that inherits from the person class – aside from setting the adult’s name, age and birthday using the person class – you should also be able to set the parent’s occupation, spouse’s name, whether they are mom or dad, and the number of children they have.

Create the necessary attributes, accessors, mutators, print function, and a constructor WITH arguments.

Note: Create adult.h and adult.cpp only – not the main.cpp (Points : 18)

4. Create a class called simpleMath – this class should have two int attributes and accessor and mutator methods to set and get those two int attributes – and a calcSum method that returns the sum of the two ints, a calcDifference method that returns the difference of the two ints, a calcProduct method that returns the product of the two ints, and a calcDivision method that returns the division result of the two ints. Also make sure to create a constructor WITH arguments.

(The order of a/b or b/2 , a-b, b-a, is up to you)

Note: Just need to create the simpleMath.h and simpleMath.cpp files not main.cpp (Points : 18)

6. Create a class called Coin with one string attribute.

Create the proper accessor/mutator methods for the attribute.

Create a constructor that takes no arguments that sets the string to “Unknown”

Create a method that returns the numeric value of the coin string name.

For example:
.25 should be returned if the string attribute holds “Quarter”
.05 should be returned if the string attribute holds “Nickel”

Note: Just write out Coin.h and Coin.cpp – no need for main.cpp (Points : 18)

7. Put the person, child, and the parent classes together – keep in mind that person also has a composition with a dateType object. (You don’t need dateType.h and dateType.cpp in your answer here – but might need it if you want to compile this in visual studio)

Edit your classes –
1) Make the print function in the person class a pure virtual function – which makes person class an abstract class

2) Make the parent class also contain a child object array so that in the parent class you can not only put in how many children the parent has but that many array objects holding each of the child’s name, age, birthday, grade, and gender.

3) Edit the parent class print function so that it prints both the parent object information and the child information.

Create your void main –

In your void main create one dynamic instance of a parent object – and ask a user (assuming they are a parent) for their name, age, birthday, occupation, spouse’s name, whether they are mom or dad, number of children. Then for each children ask for the child’s name, age, birthday, grade, and gender.

Once you set all of this information for the dynamic parent object. Call the print function from the parent object so that it displays all of this information back to the user.

Note: Since I can see the classes from your previous answers – just paste in here the editted methods from the classes you made and the void main code. (Points : 22)

* If you want to purchase multiple products then click on “Buy Now” button which will give you ADD TO CART option.Please note that the payment is done through PayPal.
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at [email protected].
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at [email protected] and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at [email protected].
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Payment Details


Lab Price = $20
Please feel free to send us your queries at: [email protected]
Payment Methods

Add to Cart

Buy Now

View Cart

Privacy Policy
We take your privacy seriously and will take all measures to protect your personal information.
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
Refund Policy
Incase you face any issues with the tutorial, please free to contact us on [email protected]
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.

Leave a Reply