Book 2: Chapter 1 Getting Started with C++ Programming.

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Object-oriented programming (OOP)

-In C++ language revolves around data created using objects.

Define a "Programming Paradigm"

-Is a programming model that uses distinct concepts to shape how programmers design, organize, and write a Program

What happens when the program is "executed"?

-Objects communicate with each other through passing messages. Each object doesn't have to know the implementation details of another object.

Objects are organized into several classes in which they can inherit methods and variables needed to perform certain functions such as:

1. Advantages 2. Improved data security 3. Code reusability 4. Ability to use inheritance 5. Data abstraction

What data-types are derived from built in data types?

1. Arrays 2. Pointers 3. Functions 4. Reference

What are the two-groups Paradigms divide into?

1. Declarative Programming paradigms. 2. Imperative Programming paradigms.

What are "abstract data types"?

1. Enumeration 2. Structure 3. Union 4. Class

What are the steps in object-oriented Design?

1. Evaluate objects created during the analysis phase. 2. Specify class dependencies. 3. Organize classes into hierarchies. 4. Design Classes.

What are the steps in object-oriented Analysis?

1. Identifying the project problem. 2. Creation of a requirement specification document for users and software itself. 3. Identifying the project objects and it's attributes. 4. Identify what services each object is to perform. 5. Establishing communication between objects. Objects should be able to interconnect with each other and exchange messages.

What are the major relationships necessary in the Design stage?

1. Inheritance Relationship. 2. Containment Relationship. 3. Use Relationship.

What are the common "Graphical Notations"?

1. Instances of Objects. 2. Message communication between objects within classes. 3. Inheritance Relationship. 4. Hierarchal chart. 5. Client-server relationship. 6. Classification relationship.

What are the 3 components that make up a "Declarative Programming Paradigm"?

1. Logic 2. Functional 3. Database or data driven

What are some of the most frequent used Functions in classes?

1. Management Functions. 2. Implementation Functions. 3. Access Functions. 4. Utility Functions.

What are 3 primary Data types in C++?

1. Primitive data types. 2. Derived data types. 3. Abstract or user defined data types.

What is the "Driver Program" responsible for?

1. Receiving user inputs. 2. Creating objects from a class definition. 3. Displaying program outputs based on the user requirements. 4. Making calls to the member functions.

Character and integer data types can be modified using the following C++ modifiers:

1. Signed 2. Unsigned 3. Short 4. Long

What should the "requirement document" state?

1. The outputs which are used. 2. The process to be used in order to produce these outputs. 3. Inputs required. 4. The resources required to achieve desired results.

What are the main key features to execute a Program in C++?

1. objects 2. classes 3. Data Abstraction & Encapsulation 4. Inheritance 5. Polymorphism

What is a "local variable"?

A variable declared inside a function.

If an object is created by combining all the class attributes, what are they called?

Abstract Classes

What happens when a "Connection" is established between Objects?

After determining the services each object will offer, a communication channel which is established between objects based on the service each object offers and receives.

What should you test when Testing code?

All the classes dependencies and interfaces.

What are "objects"?

Are real time entities that represent data and methods of functions used in the manipulation of the data.

Why is C++ claimed to be a partial language?

Because they 1. Use global variables 2. Optional creation of classes and objects 3. Supports friend function.

Free store memory is unallocated memory:

Dynamically assigned to a program during its execution time.

Define "Management Function"

How to create an object and how to destroy an object.

Define Containment Relationship

In this type of relationship, an object of class A is used as a member of class B.

What is "Object-Oriented Analysis"?

Involves techniques used in determining the software requirements of an object and its behavior and interactions.

Primitive data type/ built in data type

Is a predefined or built in data type that is used to directly to declare a variable.

What do you do to get the number of elements stored in a multi-dimensional array?

Multiply the size of the dimensions. In the array of int M [5][12], you can store (5*12)=60 Elements.

What happens when an "Object" is identified?

Once an object is identified the next step is to determine the set of services each object is supposed to perform.

How does a "Parallel processing paradigm" function?

Program instructions are processed using multiple processors. A parallel processing paradigm has several processors aimed at running a program in the shortest time possible.

What should you consider when "mapping out" content?

Put into consideration the reusability of classes if you had a previous design and the classification of the objects into subsystems.

object-oriented notation and graphs

The graphical notation is very important in the project design and development process.

Define "Implementation Function"

The operations perferred on the class data type.

Define Inheritance Relationship

This allows a class to inherit properties and behaviors of another class.

What is a "Textual Analysis"?

This includes a detailed textual description of the problem with one or two paragraphs with several sentences based on the complexity of the problem.

Define "Utility Function"

This involves how to handle errors and access control.

Define "Access Function"

This is a function for accessing the internal variables of the class.

Define Use Relationship

This is the type of relationship that provides information on the various classes a particular class uses and how it uses the classes.

What does a "Procedural Paradigm" do ?

This paradigm focuses on step by step processes to perform a specific function.

What is object Identification?

This step involves the identification of real-world objects and abstract objects

object-oriented programming (OOP)

This uses a collection of classes and objects to write a program.

A data flow Diagram uses various symbols that represent data, and they are used to indicate the flow of data from one point to another, T or F?

True

A pointer variable points to the data type of the variable and it is created using the asterisk(*) operator, Syntax: Type *variable-name; T or F?

True

A two-dimensional array is the simplest array format. This array format uses 'r' number and 's' number of columns to form a table, T or F?

True

After creating an inheritance relationship between objects, you have to re-examine the relationships and create class hierarchies, T or F?

True

All Function calls are made in the main() function, T or F?

True

Although C++ supports all the OOP features, it is said to be a partial OOP language, T or F?

True

An object is the smallest entity where all computations take place, T or F?

True

Analysis involves decomposition into various compartment parts, It then establishes a logical model which evaluates system functions, T or F?

True

Analysis of the relationship between the classes is very important, as it enables you to determine the appropriate class to represent the objects and establish relationships between objects, T or F?

True

C++ Language uses "objects" to execute programs. T or F?

True

DFD has input/output symbols, decision symbols and the process symbol which acts as the data store for all objects, T or F?

True

Declarative programming paradigms emphasize what action needs to be done and declares the result to be achieved, T or F?

True

Developing program specifications ensures there is a clear and well-organized statement of the project problem, T or F?

True

Each program has a large pool of free memory it can utilize during its running time, T or F?

True

Enumerated data types use "enum variable" to declare an optional data type and list of identifiers that show the values of the data type, T or F?

True

Evaluating objects identified in the problem space enables you to refine objects based on their attributes and their operations, T or F?

True

Global variables are declared outside of the function and can be called or accessed by any function, T or F?

True

Hierarchies allows you to reuse data and functions that have been established, T or F?

True

Identifying similar attributes and functions within a group of related classes helps in organizing the classes into hierarchies, T or F?

True

If you're planning to override some attributes or functions, it is highly recommended to use an inheritance relationship, T or F?

True

In C++ Programming, the compiler allocates memory space for each variable created based on the data type, T or F?

True

It is not necessary to create classes or objects as long as you have the main(), T or F?

True

Logical programming paradigms, Relies on the knowledge base which is already known and passes it to a machine learning tool to produce results, T or F?

True

Member functions, define some of the task to be performed on an object, T or F?

True

Multi-Dimensional is an array of arrays which stores data in the form of tables with both rows and columns and also known as the "Matrix" T or F?

True

Object oriented paradigm focuses on objects that encapsulate data and procedures. These objects play a major role in software development, T or F ?

True

Object oriented paradigm relies heavily on system theory as part of its conceptual background, T or F ?

True

Object-oriented analysis provides us with powerful mechanisms to identify objects that are used, as the building blocks in the development of software, T or F?

True

Object-oriented design connects software OOA requirements into specifications for objects and generates a class hierarchy for object creation, T or F?

True

Objects are organized into several classes in which they can inherit methods and variables needed to perform certain functions, T or F ?

True

Objects can be found in the application and are analyzed by the use of data flow diagrams (DFD) and Textual Analysis (TA), T or F?

True

Objects communicate with each other through "message passing technique", T or F?

True

Once a local variable is declared statements within the function can be execute or access variables, T or F ?

True

Once you finish coding the program you have to test it for errors and to determine whether it functions as expected, T or F?

True

Pointers are very essential in the implementation of C++ programs. They help in dynamic allocation of memory space. Making it easy for programs to execute differently T or F?

True

Program implementation involves coding and testing the developed programs, T or F?

True

Program testing is an essential feature in the software development process, T or F?

True

Specifying the data type for all variables created tells the compiler how much space to allocate for each variable, T or F?

True

The design process involves mapping out objects and creating a conceptual model of the system., T or F?

True

The main() Function is a standard C++ Driver Program, T or F?

True

The modifiers indicate how much memory space is needed to store those variables, T or F?

True

The program code is written using class member functions and the driver program, T or F?

True

The variables are usually declared at the top of the program after the "namespace" library thus making it accessible throughout the entire program, T or F ?

True

There are different types of paradigms, and each fulfils a specific function based on the programming language, T or F?

True

Two-Dimension elements in an array are represented by r[x][y], where "x" is the row # while "y" is the column #, T or F?

True

Using "Pointers" simplifies program execution by holding the memory address of the stored variables, T or F?

True

When declaring variables, you have to define the data type for each variable, T or F?

True

When designing objects it is important to come up with class hierarchies, identify any abstract class, and simply message passing process between objects, T or F?

True

When you declare a variable a memory location is created to store the values, T or F?

True

Where, the enum_name is the enumeration data type name. You can have one or more list of names separated by commas, T or F?

True

You can use a bottom-up approach to build a programming structure or a Top-down approach by designing the class member function that provides the service to the system T or F?

True

You can use a top-down function decomposition approach to design member functions, T or F?

True

You can use an entity relationship diagram or information flow diagram to list information being communicated by each object, T or F?

True

When assigning memory address to the pointer variable, an ampersand (&) operator is used, T or F?

True Ex: int *ptr= &variable-name;

What is a "global variable"?

Variables declared outside of a function.

What is a "Super Class"?

When a new class is formed from related classes.

How can you create a pointer that points towards a variable?

int *ptr;


Set pelajaran terkait

การถนอมอาหาร

View Set

HN CH 14 Pregnancy and Breastfeeding Connect

View Set

Consumers, Producers, and the Efficiency of Markets

View Set

DMI65: CT Chapter 3 Image Reconstruction

View Set