Posted in All Posts, Downloads, Semester 2

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

3. Define currency class which contains rupees and paisa as data members. Write a friend function named AddCurrency ( ) which add 2 different Currency objects and returns a Currency
object. Write parameterized constructor to initialize the values and use appropriate functions to get the details from the user and display it.
Download | View Code

4. Create Calendar class with day, month and year as data members. Include default and parameterized constructors to initialize a Calendar object with a valid date value. Define a function AddDays to add days to the Calendar object. Define a display function to show data in “dd/mm/yyyy” format.
Download | View Code

5. Create a class named ‘String’ with one data member of type char *, which stores a string. Include default, parameterized and copy constructor to initialize the data member. Write a
program to test this class.
Download | View Code

6. Write a base class named Employee and derive classes Male employee and Female Employee from it. Every employee has an id, name and a scale of salary. Make a function ComputePay (in hours) to compute the weekly payment of every employee. A male employee is paid on the number of days and hours he works. The female employee gets paid the
wages for 40 hours a week, no matter what the actual hours are. Test this program to calculate the pay of employee.
Download | View Code

7. Create a class called scheme with scheme_id, scheme_name, outgoing_rate, and message_charge. Derive customer class from scheme and include cust_id, name and mobile_no data.
Define necessary functions to read and display data. Create a menu driven program to read call and message information for a customer and display the detail bill.
[Will be available soon]

8. Write a program with use of inheritance: Define a class publisher that stores the name of the title. Derive two classes book and tape, which inherit publisher. Book class contains
member data called page no and tape class contain time for playing. Define functions in the appropriate classes to get and print the details.
Download | View Code

9. Create a class account that stores customer name, account no, types of account. From this derive classes cur_acc and sav_acc to include necessary member function to do the
following:
• Accepts deposit from customer and update balance
• Compute and Deposit interest
• Permit withdrawal and Update balance.
[Will be available soon]

10. Write a base class named Employee and derive classes Male employee and Female Employee from it. Every employee has an id, name and a scale of salary. Make a function ComputePay (in hours) to compute the weekly payment of every employee. A male employee is paid on the number of days and hours he works. The female employee gets paid the wages for 40 hours a week, no matter what the actual hours are. Test this program to calculate the pay of employee.
Download | View Code

Download All

I hope that you found this article to be helpful.
Please share your thoughts in the Comments Section.

If you liked this article, then please like our Facebook page.

Suggested Reading

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

HiTech Banda – My YouTube Channel

Hey guys!
It has been quite a time since I last posted.
I will soon post programs of Data Structures (DS) and Object Oriented Concepts and Programming (OOCP).

Why this post, and what is HiTech Banda?

This is to tell you about HiTechBanda – a YouTube channel I started recently. I upload various videos like solved issues, programming tutorials, tech updates, new innovations etc. on the channel.
Please subscribe and share.
Click here to visit channel.

HiTech Banda – Social

I have also created a Facebook page and Twitter handle for the same.
Please like, follow and stay connected.
😀

Cheers,
Vaibhav Bansal

P.S. – You are free to comment your suggestions and thoughts below in the Comments Section.

Posted in All Posts, Downloads, Semester 2

Sem 2 – DHTML & XML Unit 4 Programs

DHTML & XML – DYNAMIC HTML & XML

Unit 4 – Related to Advanced XML

1. Write a program to implement the concept of Sequence, Occurrences and Choices in DTD.
Download | View Code

2. Write a program to describe Empty, Any and Mixed content in DTD.
Download | View Code

3. Write a program to describe Attribute declaration in DTD. (Default, String, Tokenized, Enumerated)
Download | View Code
Continue reading “Sem 2 – DHTML & XML Unit 4 Programs”

Posted in All Posts, Downloads, Semester 2

Sem 2 – ACP Unit 4 Programs

ACP – Advanced C Programming

Unit 4 : Using Files

1. Write a program to display contents of file on the screen. The program should ask for file name. Display the contents in capital case.
Download | View Code

2. Write a program to find size of the file.
Download | View Code

3. Write a program to combine contents of two files in a third file. Add line number at the beginning of each line.
Download | View Code
Continue reading “Sem 2 – ACP Unit 4 Programs”