Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
7 views

GE1a Programming Using C++

Uploaded by

sinhamohit1947
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

GE1a Programming Using C++

Uploaded by

sinhamohit1947
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Date: 29.11.

2022

Generic Elective
GE – 1a: Programming using C++

S. Referenc
Unit Name Chapters Weeks
No. es

1, 2 [2]
1. Unit 1 Introduction to C++ Pg 10 – 17 [1] 1–3
Pg 20 – 22 [3]

3 (3.1 – 3.5, 3.9 – 3.13, 3.15, 3.18


Unit 2 Programming – 3.22, 3.24 – 3.25)
2. 4–8
Fundamentals
4 (4.1 – 4.6, 4.10)

5 (except 5.2, 5.15, 5.18) [2]


Unit 3 Object Oriented 6 (except 6.5, 6.6 and 6.8 – 6.10)
3. 9 – 15
Programming 8 (upto 8.5)
12

Essential/recommended readings

1. Stephen Prata, C++ Primer Plus, 6th Edition, Pearson India, 2015.
2. E. Balaguruswamy, Object Oriented Programming with C++,8th edition, McGraw-Hill
Education, 2017.
3. D.S. Malik, C++ Programming: From Problem Analysis to Program Design, 6th edition,
Cengage Learning, 2013

Sample Practical List

1. Write a program to compute the sum of the first n terms of the following series:
𝑆 = 1 − 2 + 3 – 4 + ... + n
The number of terms n is to be taken from the user.

2. Write a program to display the following pattern:


1
22
333
4444
55555
The number of rows to be displayed is to be taken from the user.
3. Write a program to compute the factors of a given number.

4. Write a menu driven program to perform the following operations on an array:


a) Find the minimum, maximum and average of the array elements
b) Search an element in the array using linear search

5. Write a menu driven program to perform the following operations on a string:


a) Calculate length of the string
b) Check whether the first character of every word in the string is in uppercase or not
c) Reverse the string

6. Create a class Triangle. Include overloaded functions for calculating the area of a triangle.

7. Create a template class TwoDim which contains x and y coordinates. Define default
constructor, parameterized constructor and void print() function to print the coordinates.
Now reuse this class in ThreeDim adding a new dimension as z. Define the constructors
and void print() in the subclass. Implement main() to demonstrate the use of these classes.

You might also like