0% found this document useful (0 votes)
13 views2 pages

C++ End Term Lab

The document outlines various programming tasks in C++ related to exception handling, templates, and file handling. It includes creating programs for handling divide by zero exceptions, implementing function templates for summing series, and managing file operations for product and student data. Additionally, it covers user-defined exceptions, recursive function templates, and class template inheritance.

Uploaded by

NIKLAUS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

C++ End Term Lab

The document outlines various programming tasks in C++ related to exception handling, templates, and file handling. It includes creating programs for handling divide by zero exceptions, implementing function templates for summing series, and managing file operations for product and student data. Additionally, it covers user-defined exceptions, recursive function templates, and class template inheritance.

Uploaded by

NIKLAUS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

unit 6

Exception handling

write a program in c++ to implement divide by zero exception using exception handlers.

write a program in c++ to implement try with multiple catch statements

write a program in c++ to implement rethrowing and exception using excrption handler

write a program in c++ to implement to implement exception in constructor and destructor.

create a user define exception or custom exception to validate user input

unit 5

Templates

Create a fucntion template which perform sum of series for any data type like float,integer (function
template ex)

write a program in c++ to implement the concept recursive function template

write a program in c++ to implement overloading function template

Create a class template defined class, array list which will perform array operation like insert array
elements, search array elements, transverse array elements

Create a array list template class whcih will be derived from derive class name sorted array which
will perform sorting of array elements

write a program in c++ to implement class template inheritance/template class inheritance or write
a program in c++ to implement inheritance between the

template class and derived class

unit 4

File handling

Create a product class take details from product method store all product information in a test file
and display details of product to the user screen

Write a program to store the data of 5 students into a file and read the data of third and fourth
student from the file using file pointers.
Write a program to store the information of Vehicle in a text file: Vehicle Name, Vehicle model and
Vehicle price, use class object and method to handle file operations.

Write a program to store the data of 5 products into a file and read the data from the file in nth
location which is entered by user. Take Product details:(product name, product price and quantity)

Write a program to accept the data required for admission form in LPU and store this data into a
file.Read and write the data into a file using class objects.

Write a program to store the information of Person in a text file: Name, age and gender, use class
object and method to handle file operations.

Write a program in c++ to implement the concept of file pointers for read and write operation mode
or to implement random access approach or method

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy