Documente Academic
Documente Profesional
Documente Cultură
Instructor Inputs
1.2 Instructor Inputs NIIT
Session Overview
This session covers Chapter 1.
Note: Each session covers one chapter. The footer in the slide contains Lesson 1, which is
same as Session 1.
Slide 1
Objectives
In this lesson, you will learn to:
Explain the features of object-oriented methodology
Describe the phases of object-oriented methodology
Create classes in C++
Start the session by sharing the session objectives with the students.
Explain the types of complexities involved in a software system. Provide the students with
real life examples so that they can understand easily understand the concepts.
Slide 3
Explain the reasons for the difficulties involved in the Development of Software by taking
appropriate examples.
Simplifying Complexity
Is done by breaking the system into its component
parts and arranging them in a hierarchy
Ask the students how they could simplify the complexities involved in a software system.
Elaborate upon the correct answers provided by the students. Also explain how the
breaking of the system into its component parts and arranging them in a hierarchy helps in
reducing the complexity.
Just a Minute…
Jane has called a technician to repair her television. How
would the technician deal with the complexity of the
television?
Use this slide for a quick recap of the concepts. The solution for the preceding problem is:
The television is a complex system. It would be impossible and thus meaningless to
understand its comprehensive functioning, at one go. Thus, the technician would
concentrate on the different parts of a television and understand their respective functions
and the problems that are likely to occur in each one of them. For example, the technician
might first inspect if the antenna for the television is positioned appropriately. Then, he
might inspect the picture tube of the television.
Object
Is an instance of a class that exhibits some well-
defined behavior
Slide 7
Characteristics of Objects
State
Is indicated by a set of attributes and the values of
these attributes
Behavior
Is indicated by how an object acts and reacts
Identity
Distinguishes the object from all other objects
Use this slide to explain the characteristics of an object. Provide the students with the
example of an object, such as a music system. If the music system is at ideal position, it
Ask the students to state some more examples of objects by depicting their state, behavior,
and identity.
Slide 8
Just a Minute…
Identify the possible attributes to define the state of the
following objects:
Tea cup
Stereo tape-recorder
Use this slide for a quick recap of the concepts. The solution for the preceding problem is:
Attributes of a teacup: the dimension, the material with which the cup is made, and the
color(s) used in the cup.
Classes
Define the attributes and behaviors of an object
Example:
B IR D S
PEAC O C K SPAR R O W K IN G F IS H E R
Introduce the concept of the class and explain it by providing a real-world example.
Explain the concept of class and objects by using the example given in the slide. You can
also state the example of the furniture class, which has objects such as a table, a chair, and
a desk.
At this time, tell the students that all things can be classified as living and nonliving.
These can then be classified as classes and then they can identify the objects of these
classes.
Slide 11
Use slides 10 and 11 for explaining the concept of messages and methods.
Just a Minute…
Dr. James and Mr. Hyde went to the railway station to
book two tickets in the Flying express for 3 rd December
by AC 1st class. Identify the following:
a.The possible receiver of the message in this situation
b.The possible method that the receiver can use
Use this slide for a quick recap of the concepts. The solution for the preceding problem is:
1. The receiver of the message here would be the clerk sitting behind the counter.
2. The clerk would check if two tickets are available on the train in the desired class,
on the desired date. If they are, the clerk would enter the details (either he would put
down the details of name, age, date, seat, berth numbers, etc, in a register or feed it
in the computer) confirming the reservation of two tickets, and collect the fare.
Use this slide to explain the benefits of object-oriented approach. You can use the car
class example to explain that realistic modeling in the object-oriented approach helps
identify objects along with their attributes and behavior. Explain the attributes and the
behavior of the car class. Ford Fusion is an object that belongs to the car class. The Ford
Fusion has attributes such as engine, color, model, and mileage. It displays behavior such
as running on a road, halting while running on a road, and honking.
Now, explain the concept of reusability by extending the car class example. A company
wants to make a new car with a new feature. It wants to use the design of an existing car
model and add the new functionality to it. Therefore, the company is reusing the design.
Just a Minute…
State whether the following situations demonstrate
reusability:
a. Recycling paper
b. Pump reusability (same pump is used in a well and in
a fuel station)
Use this slide for a quick recap of the concepts. The solution for the preceding problem is:
1. Does not represent reusability because the paper is destroyed before new paper is
made. Hence, the old paper loses its identity and cannot be considered the same as
the new paper. Consumption is not reusability.
2. Represents reusability because a pump can be used for suction of water as well as
petrol. Here, it is not the same pump, but the mechanism (method) is being reused.
Explain the concept of resilience to change. Discuss the example of a car manufacturing
company that wants to run one of its existing car models on CNG. This is an example of
resilience.
Use slides 16, 17, and 18 to explain various phases of software development. You can
give an example of a builder who needs to construct a shopping mall. In the analysis
phase, the builder identifies the requirements of the project, which includes the
requirement for raw materials, money, labour, etc.
In the design phase, the builder creates a prototype or a model of the shopping mall and
gets it approved from the client. The construction of the shopping mall starts in the
implementation phase.
You can use the board in the classroom to explain the various phases. Ask the students to
relate these phases to the phases in software development.
Tell the students that the analysis phase of a software development project involves
understanding the user requirements. The design phase involves creating a prototype of
the software application on the basis of the user requirements. The implementation phase
involves developing and deploying the software application at the user end.
Slide 18
Slide 20
Just a Minute…
As a member of a team that is developing the billing
system software for Diaz Telecommunications Inc., you
have been assigned the task of creating a software
module that accepts and displays customer details.
Identify the class that you will create and the methods of
the class.
As per the problem statement, the class should have the following methods:
Method to accept customer details
Method to display customer details on the screen
Slide 21
Use this slide to discuss the brief history of the languages. Tell the students about the
generation of languages. Also, discuss the advantages and limitations of the languages
that fall under different generations of languages.
Introduce C++ to students. Discuss the brief history of the evolution of C++.
Slide 23
Use slides 23, and 24 to discuss the how to create classes in C++. Explain the example
given in the slides.
};
Slide 25
Use this slide to discuss the conventions and rules that should be followed to name the
classes.
Use this and the next slide to discuss member functions. Also, explain the keywords used
in the example that is given in the slide.
Slide 27
You can divide the class into various groups. Ask each group to provide a solution to the
problem statement. The group that solves the problem statement first will present its
solution to the class.
Slide 30
Use this slide to conduct the activity in the collaborative mode by dividing the class into
various groups. Ask each group to provide a solution to the problem statement. The group
that solves the problem statement first will present its solution to the class.
Slide 31
Summary
In this lesson, you learned that:
Complexity of software arises mainly due to four
reasons:
Difficulty in understanding the intricacies and
complexity of the system and its needs
Communication problems during development
Lack of standards for developing software
Difficulty in predicting software behavior
One way of dealing with the complexity of software is
to break down an application into its components and
deal with each component separately
©NIIT OOPS/Lesson 1/Slide 31 of 34
Use this and the next three slides to summarize the session.
Slide 32
Summary (Contd.)
The object-oriented approach views the systems as
consisting of component objects and looks at the
interactions between them
An object is an entity that may have a physical
boundary and is also characterized by the following:
State
Behavior
Identity
A class consists of a set of objects that share a
common structure and behavior
If one object desires an action from another object, it
sends a message to the second object
©NIIT OOPS/Lesson 1/Slide 32 of 34
Summary (Contd.)
The object that receives the message is called the
receiver; the set of actions taken by the receiver
constitutes the method
The benefits of the object-oriented approach are:
Realistic modelling, hence it is easier to use
Reusability of code, hence it saves time and cost
Resilience to change, hence systems are easier to
maintain
In the stages of analysis and design, a model of the
system is built
Slide 34
Summary (Contd.)
The purpose of the model built during analysis and
design is to help developers understand the reality
that they are trying to imitate
Bjarne Stroustrup developed the C++ language in the
early 1980s
The cout object is an instance of the class, ostream
The class ostream is associated with the standard
output device (screen)
The output operator '<<' is used to direct a value to
the standard output device
Ans. There are many differences, but the most important ones are as follows:
The C language does not have the concept of a class.
C structures cannot have member functions or private members.
C does not allow variables to be defined any-where in the code other than the beginning
of a block.
Ans. C++ is used more than C nowadays. C++ is more versatile and can be used for a
larger number of applications than C. C++ is a superset of C.
Ans. Yes. A Windows specific compiler like the Visual C++ and DJGPP GUI compiler
will compile C++ programs and allow it to run on Windows.
Ans. No. This course teaches C++ from the ground up.