Posted in All Posts, Semester 3

Sem 3 – OOCP Unit 4 Programs

OOCP – Object Oriented Concepts & Programming

Unit 4 – Templates, Files

1. Write a program to create a function template for finding maximum value contained in an array.
Download

2. Write a program to create a class template for the ‘Array’ class.
Download | View Code

3. Create a template for the bubble sort function. Continue reading “Sem 3 – OOCP Unit 4 Programs”

Posted in All Posts, Semester 3

Sem 3 – OOCP Unit 3 Programs

OOCP – Object Oriented Concepts & Programming

Unit 3 – Virtual Functions, Operator Overloading

1. Create a class vehicle which stores the vehicleno and chassisno as a member. Define another class for scooter, which inherits the data members of the class vehicle and has a data member for a storing wheels and company. Define another class for which inherits the data member of the class vehicle and has a data member for storing price and company. Display the data from derived class. Use virtual function. Continue reading “Sem 3 – OOCP Unit 3 Programs”

Posted in All Posts, Semester 3

Sem 3 – OOCP Unit 2 Programs

OOCP – Object Oriented Concepts & Programming

Unit 2 – Dynamic Memory Management, Constructor & Destructor, Inheritance

1. Using friend function find the maximum number from given two numbers from two different classes. Write all necessary functions and constructors for the program.
Download | View Code

2. Using a friend function, find the average of three numbers from three different classes. Write all necessary member functions and constructor for the classes.
Download | View Code
Continue reading “Sem 3 – OOCP Unit 2 Programs”

Posted in All Posts, Semester 3

Sem 3 – OOCP Unit 1 Programs

OOCP – Object Oriented Concepts & Programming

Unit 1 – Introduction to OOP, Classes & Objects

1. Write a program to calculate the area of circle, rectangle and square using function overloading.
Download | View Code

2. Write a program to demonstrate the use of default arguments in function overloading.
Download | View Code Continue reading “Sem 3 – OOCP Unit 1 Programs”

Posted in All Posts, Semester 2

Sem 2 – ACP Unit 2 Programs

ACP – Advanced C Programming

Unit 2 : Using Structures

1. Write a program to define structure with tag state with fields state name, number of districts and total population. Read and display the data.
Download | View Code

2. Write a program to create a list of books details. The details of a book include title, author, publisher, publishing year, number of pages, and price.
Download | View Code

3. Define a structure called Item with members : Item_code, Item_name, Price. Create an array of five Items. Create a function which accepts the Item array and modifies each element with an increase of 10% in the price. Continue reading “Sem 2 – ACP Unit 2 Programs”