CIS247C Object-Oriented Programming

$62.00

CIS247C Object-Oriented Programming
This program creates the basic user interface code that can be used in the following week’s iLab assignments…

 

Description

CIS247C Object-Oriented Programming

CIS247C Object-Oriented Programming

A+ Entire Course: iLab Week 1-7| Quiz Week 1-6| Discussions Week 1-7

No Final Exam

iLab Week 1-7 

https://www.hiqualitytutorials.com/product/cis-247c-all-ilabs/

iLab Week 1 

https://www.hiqualitytutorials.com/product/cis247c-ilab-week-1/

  iLAB OVERVIEW

Scenario and Summary

This program creates the basic user interface code that can be used in the following week’s iLab assignments. The assignment will help you get started using the programming environment and some practice with coding. You will also be able to reuse much, if not all, of the code in later assignments.

In this program, you will create the following methods:

  1. DisplayApplicationInformation, which will provide the program user some basic information about the program.
  2. DisplayDivider, which will provide a meaningful output separator between different sections of the program output.
  3. GetInput, which is a generalized function that will prompt the user for a specific type of information, then return the string representation of the user input.
  4. TerminateApplication, which provides a program termination message and then terminates the application.

Using these methods, you will construct a program that prompts the user for the following:

  1. your name, which will be a string data type;
  2. your age, which will be an integer data type;
  3. the gas mileage for your car, which will be a double data type; and
  4. a display of the collected information.

CIS247C Object-Oriented Programming

 iLab Week 2 

https://www.hiqualitytutorials.com/product/cis247c-ilab-week-2/

iLAB OVERVIEW

Scenario and Summary

We begin our investigation of object-oriented programming by creating an object-oriented program with a class called Employee. You will create two objects based on the Employee class, along with a class that contains the main method. The attributes, constructors, and methods for this class must satisfy the requirements in Steps 1 through 3. After you create the objects, you will prompt the user for information and then display it.

We will want to ensure that this first class is well-constructed and tested since we will extend this class in Labs 3 through 6.

CIS247C Object-Oriented Programming

iLab Week 3 

https://www.hiqualitytutorials.com/product/cis247c-ilab-week-3/

  iLAB OVERVIEW

Scenario and Summary

The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes:

  1. Create a static variable called numEmployees that holds an int and initialize it to zero. This will allow us to count all the Employee objects created in the main class.
  2. Increment numEmployees in all of the constructors
  3. Add overloaded versions of setDependents and setAnnualSalary that accept strings. This way, we will have two “set” methods for both dependents and annual salary; one that accepts a string, and one that accepts its default data type.

CIS247C Object-Oriented Programming

iLab Week 4 

https://www.hiqualitytutorials.com/product/cis247c-ilab-week-4/

iLAB OVERVIEW

Scenario and Summary

The objective of the lab is to modify the Employee class to demonstrate composition and a class interface. An employee typically has benefits, so we will make the following changes:

  1. Create a Benefits class.
  2. Integrate the Benefit class into the Employee class.
  3. Create an iEmployee abstract class to guarantee that calculatePay is implemented in the Employee class.

CIS247C Object-Oriented Programming

iLab Week 5

https://www.hiqualitytutorials.com/product/cis247c-ilab-week-5/

iLAB OVERVIEW

Scenario and Summary

The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes:

  1. Create a class called Salaried that is derived from Employee.
  2. Create a class called Hourly that is also derived from Employee.
  3. Override the base class calculatePay() method.
  4. Override the displayEmployee() method.

CIS247C Object-Oriented Programming

CIS 247C iLab Week 6 

https://www.hiqualitytutorials.com/product/cis247c-ilab-week-6/

iLAB OVERVIEW

Scenario and Summary

We have two separate goals this week:

  1. We are going to create an abstract Employee class and two pure virtual functions – calculatePay() and displayEmployee(). The abstract Employee class will prevent a programmer from creating an object based on Employee, however, a pointer can still be created. Objects based on Salaried and Hourly will be allowed. The pure virtual function calculatePay() in Employee will force the child classes to implement calculatePay(). The other pure virtual function displayEmployee() in Employee will force the child classes to implement displayEmployee().
  2. We are going to implement Polymorphism and dynamic binding in this iLab.

CIS247C Object-Oriented Programming

iLab Week 7 

https://www.hiqualitytutorials.com/product/cis247c-ilab-week-7/

iLAB OVERVIEW

Scenario and Summary

This week, we learn how to manage complexity by putting together a ready-built application that comprises a number of separate header and source files. Our job here will be to take these individual files and combine them into one standalone application. Although the process is quite a simple one, it will emphasize the advantage of modularity when writing code. It also shows how code can be reused between programmers and/or applications.

CIS247C Object-Oriented Programming

Quiz Week 1-6 

https://www.hiqualitytutorials.com/product/cis-247c-all-quizzes/

Quiz Week 1 

https://www.hiqualitytutorials.com/product/cis247c-quiz-week-1/

(TCO 1) Which of the following would be a more appropriate choice for a method in a Fork class?

Color()

Bend()

Eat()

Material()

(TCO 1) By default, a class does not have the property of _____.

Encapsulating data

Information hiding

Containing both data members and member methods

Knowing how other classes are implemented

(TCO 1) Which of the following statements is/are true?

  1. A class is necessary to be defined before you can create an object.
  2. The specific values of the attributes of an object represent the state of the object.
  3. An interface of a class defines what messages an object can respond to.
  4. Objects communicate through message passing.

All are true

Only A, B, and D are true

None are true

(TCO 1) _____ is the process of identifying important attributes and behaviors of an object.

Class

Abstraction

Coding

All of the above

None of the above

(TCO 1) Which of the following would be a more appropriate choice for a data member in a TextBox class?

Resize

Show

Font Color

Write

(TCO 1) Examine the ClockType class definition. How many class members does it contain?
class ClockType
{
public:
void setTime(int, int, int);
int getTime();
void printTime();
void icrementSeconds();
private:
int hr;
int min;
int sec;
}

7

3

10

4

An average of 5 because (7+3)/2=5

(TCO 8) Most professional coding standards use _____ for class and method names.

Underscores along with all upper case words

Method Class case

No specific naming convention

Pascal case

(TCO 1) Inheritance is referred to as a(n) _____ relationship, while composition is referred to as a(n) _____ relationship.

Superclass-subclass; friend

Is-a; Has-a

Has-a; Is-a

None of the above

(TCO 1) Assume we have two classes and have instantiated two objects from each class. How many copies of each class’s attributes and methods exist in the instantiated objects?

Two copies, one copy of the first class and one of the second; objects always share attributes and methods

Zero, the objects do not have attributes and methods

Four copies, two copies of the first class and two of the second

Eight copies

(TCO 1) By default, all members of a class are _____.

Public

Private

Protected

Internal

Unfriendly

Quiz Week 2

https://www.hiqualitytutorials.com/product/cis247c-quiz-week-2/

(TCO 2) Getters and setters are sometimes called _____ methods and _____ methods, respectively.

mutator; accessor

accessor; mutator

retrieval; putter

None of the above

(TCO 2) Only those class members that are presented to the users of the class are part of the ______ of the class.

Interface

Implementation

Constructors

Superclass

(TCO 2) A Waiter is responsible for taking the order from the Customer, informing the Chef of the order and delivering the requested food back to the Customer. A Chef is responsible for preparing the food and notifying the Waiter when the food is ready. The Customer is responsible for placing an order from the menu. In identifying the interface of the Chef object, which of the following would you consider as (an) appropriate message(s) the Chef should respond to?

“Take a pound of ground meat, add a chopped onion, salt, pepper, parsley and broil for 15 minutes until the burger becomes golden brown.”

“What do you do after work?”

“Prepare a steak, medium-rare.”

All of the above

Only A and C

(TCO 2) Which of the following statements is/are false?

If a method is public, it is considered part of the class interface.

One goal regarding the implementation of a class should be kept in mind: a change to the implementation should not require a change to the user’s code.

If you declare an attribute as public, you do not have to worry about tracking down every piece of code that might have changed the attribute when debugging.

All of the above

None of the above

(TCO 5) One of the purposes of a(n) _____ is to release resources back to the system when the object is not used anymore.

Class

Constructor

Destructor

Instance variable

(TCO 5) Consider the following class definition.
class Flower
{
private:
string color;
double cost;

public:
Flower()
{
color = “red”;
cost = 0.0;
}
Flower(string c)
{
color = c;
cost = 0.0;
}

void setColor(string c)
{
color = c;
}
void setCost(int amount)
{
cost = amount;
}
}

Which of the following is/are true?

(i) The attribute cost can be set to a new value, by a user
of this class
(ii) You can write cout<<”The flower is: “ << Flower.setColor();
(iii) A default constructor is provided.

I

Ii

Only I and iii

None are true

All are true

(TCO 5) Which of the following method pairs depict method overloading?

public void Roll() ; public int Roll(int x)

public int Reverse(int x, int y) ; public int Reverse(int y, int x)

public int Subtract(int x, int y) ; public int Subtract(int x, int y, int z)

All of the above

Only A and C

(TCO 5) Which error handling technique is the least appropriate when developing an application?

Check for potential problems and abort the application when a problem is encountered.

Check for potential problems and throw an exception.

Check for potential problems, catch the mistake, and try to fix it.

Ignore the problem; all applications crash at some point.

(TCO 2) Assume a class contains two non-static data members and one static data member. If two objects have been instantiated from the class, how many copies of the static data member exist?

3

6

2

1

(TCO 2) Can two methods each define a local variable with the same name?

Yes, as long as the variable is used in the same way.

No, this is not possible because the compiler would not know which variable to use.

Yes, but only if the methods have the same name.

None of the above

Quiz Week 3 

https://www.hiqualitytutorials.com/product/cis247c-quiz-week-3/

(TCO 2) Java, C#, and C++ all allow for the use of comments. Which of the following statements are true regarding comments?

The compiler will ignore all comments if they are properly formatted.

The compiler will ignore all comments if they are properly formatted.

The output console will ignore all comments if they are properly formatted.

All of the above

None of the above

(TCO 2) Which of the following statements is true?

Object names are listed in the middle section of a UML diagram.

Attribute names are listed in the middle section of a UML diagram.

Method names are listed in the middle section of a UML diagram.

Method names are listed in the middle section of a UML diagram.

None of the above

(TCO 2) A(n) _____ has the same name as the class it is declared in, it is used to initialize attributes and accepts zero arguments.

Default destructor

Default constructor

Initializing method

Instantiation

None of the above

(TCO 2) _____ attributes are hidden from outside classes, which is also known as information hiding.

Static

Private

Public

All of the above

(TCO 2) Encapsulation _____ and provides _____ for program components.

Protects an object’s data from unwanted modifications; independence

Protects an object’s methods from unwanted modifications; independence

Provides universal access to an object’s attributes; a stable implementation

Provides universal access to an object’s methods; a stable implementation

None of the above

(TCO 2) Which of the following symbols indicate level of access for both attributes and methods in a class?

&&

/

II

All of the above

(TCO 2) Object-oriented classes should be designed with the concept of a black box in mind. This means that users of the class should only need to know what _____ and _____ are associated with the class. The actual implementation details need not be known.

interface; implementation

inputs; outputs

objects; accessors

relationships; interfaces

(TCO 2) Which of the following statements is false about encapsulation?

Encapsulation assists in creating reliable code.

Encapsulation assists in creating reliable code.

Encapsulation assists in creating reliable code.

None of the above

(TCO 2) Which of the following is a proper implementation for a getter?

public: int getAge() { return age;}

public: void getAge() {return age;}

public: void getAge() {return age;}

public: void getAge() {return age;}

(TCO 2) Identify the getter declaration(s) below that most likely adhere(s) to the concept of information/data hiding.

private: string getName(){return name;}

public: string getName(){return name;}

private: void getName(){return name;}

public: void getName(){return name;}

None of the above

CIS247C Object-Oriented Programming

Quiz Week 4 

https://www.hiqualitytutorials.com/product/cis247c-quiz-week-4/

(TCO 3) A solid object-oriented design process includes which of the following?

Doing good analysis

Gathering user requirements

Identifying the classes

All of the above

(TCO3) When would a programmer write more than one constructor?

You never have more than one constructor

The constructor cannot be overloaded

The one object can be created by two different constructors

When the object can be initialized in more than one way

(TCO3) Which of the following might lead to potential class(es)?

Checking account

Customer

Deposit

A and B

None of the above

(TCO3) Why do classes need to collaborate with each other?

Most classes do not exist in isolation.

Classes need to interact with other classes to get something they want most of the time.

This is where messages between classes apply.

All of the above

(TCO 3) Assume you have an Employee class with a non-static attribute named salary. If you create ten objects of this class, how many copies of the salary variable will you have?

2

10

An unlimited number

None of the above

(TCO3) What happens right after gathering requirements in the object-oriented design process?

Developing SOW

Identifying classes

Identifying classes

Identifying classes

(TCO3) In the object-oriented design process, what is/are the reason(s) to identify requirements early and keep design changes to a minimum?

The cost of a design change in the implementation phase is significantly higher.

The cost of a design change after the deployment phase is astronomical when compared to the first item.

The cost of a requirement/design change in the design phase is relatively small.

All of the above

(TCO3) In object-oriented design, which of the following is true about the gathering requirements phase?

It represents what the user wants the system to do and is the most important part of the system.

The level of detail needs to be very technical.

The requirement document does not need to be very specific to represent the true nature.

The gathering requirement happens after the developing user interface prototype.

(TCO 3) Which of the following is true?
An abstract data type:
I. Captures a data representation;
II. Defines the operations that are allowed on its data;
III. Replaces structured programming

I, II, and III

I, II

I, III

II, III

(TCO 3) Classes do not have the property of _____.

Encapsulating data

Information hiding

Containing both data and functions

Containing both data and functions

Quiz Week 5 

https://www.hiqualitytutorials.com/product/cis247c-quiz-week-5/

(TCO 3) Which of the following about composition is true?

Composition promotes code reuse.

Class composition means a class contains objects from another class.

Inheritance and composition can be used together.

All of the above

(TCO 4) Which of the following is true about inheritance?

Child classes are more generalized than their associated parent classes.

Inheritance demonstrates the generalization/specialization relationship.

Parent classes are more specialized than their associated child classes.

Parent classes are more specialized than their associated child classes.

(TCO 4) Select the parent class.

Circle

Shape

Cylinder

Rectangle

(TCO 4) Which of the following is not a good example of a hierarchy that could be modeled by
inheritance?

Person

Even numbers

Bank account

Reptile

(TCO 4) Which of the following examples represent the “is-a” relationship in the parent/child format?

Dog/cat

Rectangle/circle

Checking account/saving account

None of the above

(TCO 3) What is the result of over-using inheritance?

System dependencies are created.

Unnecessary relationships are created.

Code is harder to understand.

All of the above

(TCO 3) In object-oriented programming, inheritance is transitive; that means a child class _____.

Inherits only from its parent class

Inherits only selected methods and fields

Inherits all the methods and fields of all its ancestors

Does not inherit any methods or fields

(TCO 4) What inheritance mode is the most general one?

Private

Default

Public

Protected

(TCO 4) Inheritance is only possible in _____ languages.

Procedural

Object-oriented

GUI based

Non-structured

(TCO 6) _____ is the ability to combine data and operations on that data into a single unit.

Inheritance

Encapsulation

Polymorphism

Composition

Quiz Week 6 

https://www.hiqualitytutorials.com/product/cis247c-quiz-week-6/

(TCO 7) An abstract class can contain _____.

Pure virtual functions

Ordinary functions

Both A and B

None of the above

(TCO 7) What is an abstract class?

Any class which can be instantiated

A class without any subclasses

A class without any subclasses

Any superclass with more than one subclass

(TCO 7) Which of the following statements is false?

A pure virtual function is a function without function implementation and can be found in an abstract class.

If a derived class extends an abstract base class, the derived class must implement the pure virtual functions declared in the abstract base class.

If a derived class extends an abstract base class, the derived class must implement the pure virtual functions declared in the abstract base class.

Pure virtual functions are inherited.

(TCO 7) Which of the following classes is most likely an abstract class?

EvoCellPhone

EvoCellPhone

Building

Rose

(TCO 7) In terms of object-oriented programming, a contract is a mechanism that forces a programmer to adhere to a predefined application programming interface or _____.

Method signature

Class declaration

Framework

Object instantiation method

None of the above

(TCO 7) Which is the prototype for a pure virtual function in class Person called DisplayDescription which has no inputs and no returned value?

Void virtual DisplayDescription ()

Virtual void DisplayDescription () = 0;

Virtual void TVGame:: DisplayDescription() {}

Virtual void TVGame:: DisplayDescription() {}

(TCO 7) Some object-oriented languages such as C++ allow for _____, while other object-oriented languages such as Java and .NET do not.

Abstract classes

Multiple inheritance

Class overloading

Method instantiation

(TCO 7) Which of the following classes represent an abstract class?

Class Plant {
virtual void grow()=0;
}

Class Plant {
virtual void grow ();
}

Class Plant {
virtual void grow (){}
}

Class Plant {
virtual void grow (){}
}

(TCO 7) Which of the following declares a pure virtual function in an abstract C++ class?

Public: virtual void method()=0;

Public: void method() {}

Public: void Method();

Public: void method()=0

(TCO 7) What is the coding requirement(s) that a programmer must follow when writing virtual functions?

The programmer must use a “virtual” keyword in the parent class.

The parent class must have specific implementation coded in the .cpp file.

The base class must use a different name for the function than the parent class.

There are no specific coding requirements for using the “virtual” keyword.

CIS247C Object-Oriented Programming

Discussions Week 1-7 All Posts 156 Pages 

https://www.hiqualitytutorials.com/product/cis-247c-all-discussions/

Object-Oriented Programming and Lab Forum Discussions Week 1 All Students Posts 26 Pages 

https://www.hiqualitytutorials.com/product/cis247c-object-oriented-programming/

Object-Oriented Programming – 17 Pages 

The Object-Oriented Paradigm supports abstractions through Classes. Classes are software-programming abstractions; they encapsulate a set of related attributes (data members) and behaviors (methods) while at the same time they hide essential details from their users.
Let’s look at a specific problem domain, which contains Appliances. Please try to pick a specific appliance and list its typical attributes and behaviors. As a next step, code a class for the appliance you choose. Can you provide a simple example that can be utilized to represent a class in C++? What are the general constructs that are needed to create a class in C++?…

Lab Forum – 9 Pages 

This discussion concerns programming labs and techniques. Please post any programming questions or hints and tips that you have concerning this week’s programming lab. At a minimum, post at least three notes that highlight the key programming techniques and/or problems or lessons learned that you experienced with this week’s lab. What are some of the concepts that are required for the week 1 lab assignment? How will you be able to represent appropriate classes and attributes for this week’s assignment?…

Object Construction and Lab Forum Discussions Week 2 All Students Posts 29 Pages 

https://www.hiqualitytutorials.com/product/cis-247c-object-construction/

Object Construction – 16 Pages 

What do we mean when we say “make sure an object is in a proper state when it is created” and how is this accomplished in object-oriented programming? Give examples to support your thoughts. Can you further discuss the concept that allows for two constructors to exist within a class?  How is this important in representing objects in classes?…

Lab Forum – 13 Pages 

This discussion concerns programming labs and techniques. Please post any programming questions or hints and tips that you have concerning this week’s programming lab. At a minimum, post at least three notes that highlight the key programming techniques and/or problems or lessons learned that you experienced with this week’s lab. Can you further discuss tips for identifying appropriate calculations and variables that may be needed?  How might method overloading apply to this week’s lab assignment?…

Encapsulation and Lab Forum Discussions Week 3 All Students Posts 25 Pages 

https://www.hiqualitytutorials.com/product/encapsulation-and-lab-forum/

Encapsulation – 13 Pages 

Define encapsulation in terms of object-oriented programming and discuss how it relates to data/information hiding. What mechanisms can be used to ensure that data encapsulation is successfully implemented in an application?  How are classes able to access certain attributes in an outside class?…

Lab Forum – 12 Pages 

This discussion thread is used to discuss the programming labs, techniques, and any questions that you may have. Post any programming questions or “hints and tips” you have on this week’s programming lab. At a minimum, post at least three notes that highlight the key programming techniques, problems you had with this week’s lab, or help for other students.  How is an application supposed to access the private variables of the Person class?…

Identifying Classes and Lab Forum Discussions Week 4 All Students Posts 16 Pages 

https://www.hiqualitytutorials.com/product/cis-247c-identifying-classes/

Identifying Classes – 7 Pages 

After we perform the analysis and collect the user requirements, the process of identifying classes begins. How do we identify classes? How do we decide the responsibilities of each class? Shall a class take more than one responsibility?  What do you think are some important points to consider when determining responsibilities for classes with in an application?…

Lab Forum – 9 Pages 

This discussion thread is used to discuss the programming labs and techniques. Please post any programming questions or “hints and tips” that you have concerning this week’s programming lab. At a minimum, post at least three notes that highlight the key programming techniques and/or problems you had with this week’s lab.

This section lists options that can be used to view responses. One of the principle features of components in OOP is the has-a concept.  Can you further provide an example that clarifies and exemplifies the has-a concept in object-oriented programming?…

Inheritance and Lab Forum Discussions Week 5 All Students Posts 25 Pages 

https://www.hiqualitytutorials.com/product/inheritance-and-lab-forum/

Inheritance – 13 Pages

Often, commonalities exist among classes. Objects might have similar but still somewhat different sets of attributes and operations. What mechanisms can we use to represent different degrees of similarity among entities in C++?  Which class is the parent class and which class is the child class?  How is inheritance achieved and appropriate method overriding?…

Lab Forum – 12 Pages 

This discussion thread is used to discuss the programming labs and techniques. Please post any programming questions or “hints and tips” that you have concerning this week’s programming lab. At a minimum, post at least three notes that highlight the key programming techniques and/or problems you had with this week’s lab. What are some of the key concepts related to this week’s learning outcomes that are demonstrated in the week 5 lab assignment?….

Interfaces and Abstract Classes and Lab Forum Discussions Week 6 All Students Posts 21 Pages 

https://www.hiqualitytutorials.com/product/cis-247c-interfaces-and-abstract-classes/

Interfaces and Abstract Classes – 11 Pages 

Discuss how interfaces and abstract classes can be used to create subclasses that contain similar attributes and behaviors. Utilize this discussion to address the topic of interfaces and abstract classes that we have previously touched upon.  Specifically, how can we utilize interfaces and abstract classes in C++ in order to create subclasses?…

Lab Forum – 10 Pages

This discussion thread is used to discuss the programming labs, techniques, and any questions that you may have. Post any programming questions or “hints and tips” you have on this week’s programming lab. At a minimum, post at least three notes that highlight the key programming techniques, problems you had with this week’s lab, or help for other students.  Please utilize this forum to address how the concepts of interfaces and abstract classes will apply to the week 6 lab assignment….

Self-Documenting Code and Lab Forum Discussions Week 7 All Students Posts 14 Pages D

https://www.hiqualitytutorials.com/product/cis247c-self-documenting-code/

Self-Documenting Code – 8 Pages 

What are your opinions on the assertion in the lecture that programming style has more to do with program readability than comments? What IS good programming style? What is bad programming style? For example, how does proper naming of variables help to improve program readability.  Can you provide a good example of a strong variable naming convention versus a weak one?…

Lab Forum – 7 Pages 

This discussion thread is used to discuss the programming labs and techniques. Please post any programming questions or “hints and tips” that you have concerning this week’s programming lab. Post at least three notes that highlight the key programming techniques and/or problems you had with this week’s lab. What are some tips for ensuring that a program is broken down into appropriate components?…

CIS247C Object-Oriented Programming

DeVry