0% found this document useful (0 votes)
26 views

Assignment 2

The document lists 16 programming tasks that require writing C++ or Java programs using object-oriented programming concepts like classes, objects, constructors, static members, overloading, and destructors. The programs cover basic input/output, swapping values, arithmetic operations, student record handling, GPA and CGPA calculation, prime number checking, factorials, series summation, static data and member functions, constructor overloading, copy constructors, runtime overloading, constructors with default arguments, and destructors. All inputs must be through constructor functions and outputs through member functions, without static initialization.

Uploaded by

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

Assignment 2

The document lists 16 programming tasks that require writing C++ or Java programs using object-oriented programming concepts like classes, objects, constructors, static members, overloading, and destructors. The programs cover basic input/output, swapping values, arithmetic operations, student record handling, GPA and CGPA calculation, prime number checking, factorials, series summation, static data and member functions, constructor overloading, copy constructors, runtime overloading, constructors with default arguments, and destructors. All inputs must be through constructor functions and outputs through member functions, without static initialization.

Uploaded by

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

1. Write a C++/Java program that performs the basic I/O using the concepts of class and objects.

[No static initialization will be allowed. Any input must be through the constructor functions and
the output through the member functions.]
2. Write a C++/Java program that uses reference variables as arguments to swap the values of
a pair of integers using the concepts of class and objects. [No static initialization will be allowed.
Any input must be through the constructor functions and the output through the member
functions.]
3. Write a C++/Java program that performs basic arithmetic operations using the concepts of
class and objects. [No static initialization will be allowed. Any input must be through the
constructor functions and the output through the member functions.]
4. Write a C++/Java program that handles the students’ records using the concepts of class and
objects. [No static initialization will be allowed. Any input must be through the constructor
functions and the output through the member functions.]
5. Write a C++/Java program that calculates the GPA for students using the concepts of class
and objects. [No static initialization will be allowed. Any input must be through the constructor
functions and the output through the member functions.]
6. Write a C++/Java program that calculates the CGPA for students using the concepts of class
and objects. [No static initialization will be allowed. Any input must be through the constructor
functions and the output through the member functions.]
7. Write a C++/Java program that checks whether a given integer prime or not using the
concepts of class and objects. [No static initialization will be allowed. Any input must be through
the constructor functions and the output through the member functions.]
8. Write a C++/Java program that finds the factorial of a given number using the concepts of
class and objects. [No static initialization will be allowed. Any input must be through the
constructor functions and the output through the member functions.]
9. Write a C++/Java program that calculates the summation of any given series of numbers
using the concepts of class and objects. [No static initialization will be allowed. Any input must
be through the constructor functions and the output through the member functions.]
10. Write a C++/Java program that uses static data members using the concepts of class and
objects. [No static initialization will be allowed. Any input must be through the constructor
functions and the output through the member functions.]
11. Write a C++/Java program that uses static member functions using the concepts of class and
objects. [No static initialization will be allowed. Any input must be through the constructor
functions and the output through the member functions.]
12. Write a C++/Java program that implements the concept of constructor overloading.
13. Write a C++/Java program that implements the concept of copy constructor.
14. Write a C++/Java program that implements the concept run-time function overloading.
15. Write a C++/Java program that implements the concept of constructor with default
arguments.
16. Write a C++/Java program that implements the concept of destructor.

You might also like