24CS101
24CS101
PROGRAMMING IN C++
24CS101 (Theory Course with Laboratory Component) 3 0 3 4.5
OBJECTIVES:
The Course will enable learners to:
To learn problem solving and programming fundamentals.
To gain knowledge on pointers and functions.
To apply the principles of object orientated programming.
To understand operator overloading, inheritance and polymorphism.
To use the functionalities of I/O operations, files build C++ programs usingexceptions.
List of Exercise/Experiments:
Pointers - Pointer Variables - Pointer Operators & Expressions -Pointers with Arrays - Functions -
Scope Rules -Function Arguments -return Statement - Function Variables - Storage Classes - Types
of storage classes - Create Header Files - User-Defined Functions - Inline Functions - Function
Overloading -Recursion - Namespaces.
List of Exercise/Experiments:
1. Generate salary slip of employees using structures and pointers. Create a structure Employee with
the following members: EID, Ename, Designation, DOB, DOJ, Basic pay Note that DOB and
DOJ should be implemented using structure within structure.
2. Compute internal marks of students for five different subjects using structures and functions.
List of Exercise/Experiments:
1. Imagine you are working as a software engineer at a tech company. Your team is developing a
mathematical software library that will be used in various applications across the company. One
of the features that your team lead has asked you to implement is a function that calculates the
number of trailing zeros in the factorial ofa number.
2. Create a C++ class Calculator representing a simple calculator. The class should have the
following attributes and methods:
2. Imagine you are a software developer tasked with creating a utility program for a school that
handles student scores. The school wants a simple program where teachers can enter the scores
of students for a particular test, and the program will then provide the highest and lowest scores
among them. This will help the teachers quickly identify the top performer and the student who
might need extra help.
Your task is to write program that satisfies the above scenario using inline function
3. Develop a software system to manage part-time worker students at a university. These students
have unique attributes such as their name, student ID, hourly wage, and hours worked per week.
Your goal is to create a C++ program that models this system.
4. Ramu is a software developer at a company specializing in developing softwaresolutions
for geometric shapes. Recently, a client approached with a request to create a program to
calculate the areas of rectangles and triangles.
C++ Streams – Unformatted I/O - Formatted Console I/O – Opening and Closing File – File modes -
File pointers and their manipulations – Templates – Class Templates – Function Templates -
Exception handling.
List of Exercise/Experiments:
1. Develop a simple library management system. Create a base class Book representing a book in
the library. The class should have attributes such as title, author, and ISBN (International Standard
Book Number). Implement a virtual functiondisplayDetails() to display information about the
book.
3. The financial company is developing a new software tool that will be used by financial analysts
to perform various calculations. One of the features of that projectis to implement is a function
that performs division of two numbers.
Write a program that takes two integer inputs, numerator and denominator, from the user.
Implement error handling to check if the denominator is zero. If the denominator is zero, display
the message "Division by zero is not allowed!" using an
exception. If the denominator is not zero, calculate the result of the division and display it.
4. Mini project.
TOTAL: 45+45 = 90 PERIODS
OUTCOMES:
Upon completion of the course, the students will be able to:
CO1: Solve problems using basic constructs in C++.
CO2: Implement C++ programs using pointers and functions.
CO3: Apply object-oriented concepts and solve real world problems.
CO4: Develop C++ programs using operator overloading and polymorphism.
CO5: Implement C++ programs using Files and exceptions.
CO6: Develop applications using C++ concepts
TEXT BOOKS:
1. Herbert Schildt, “The Complete Reference C++”, 4th edition, MH, 2015. (Unit 1 & 2)
2. E Balagurusamy,”Object Oriented Programming with C++”, 4th Edition, TataMcGraw-Hill
Education, 2008. (Unit 3, 4 & 5)
REFERENCES:
1. Karl Beecher,”Computational Thinking: A beginner's guide to problem-solving and
programming”, BCS Learning & Development Ltd, 2017. (Unit 1)
2. Nell Dale, Chip Weems, “Programming and Problem Solving with C++”, 5th Edition,Jones and
Barklett Publishers, 2010.
3. John Hubbard, “Schaum's Outline of Programming with C++”, MH, 2016.
4. Yashavant P. Kanetkar, “Let us C++”, BPB Publications, 2020
5. ISRD Group, “Introduction to Object-oriented Programming and C++”, Tata McGraw- Hill
Publishing Company Ltd., 2007.
6. D. S. Malik, “C++ Programming: From Problem Analysis to Program Design”, ThirdEdition,
Thomson Course Technology, 2007.
https://infyspringboard.onwingspan.com/web/en/app/toc/
lex_auth_01297200240671948837_shared/overview
LIST OF EQUIPMENTS:
1. Standalone desktops with C/C++ compiler (or) Server with C/C++ compiler.