Skip to main content

BCA 302 OOP WITH C++ III

BCA (Semester 3)
Assignment 3
Subject- OBJECT ORIENTED PROGRAMMING WITH C++


28: Why it is necessary to overload an operator?
 29: What is an operator Function? Describe the Syntax of an operator Function.
 30: What is conversion function?
 31: How Conversion Function created? Explain its syntax.
 32: Explain Binary Operator overloading using friend function with example.
 33: On which operator, operator overloading can’t be used?
 34: How to accomplish one class to another class type conversion?
 35: What is inheritance? Explain different types of inheritance.
 36: What is protected visibility modifier?
 37: Write a short note on Virtual Base class?
 38: Why virtual base class is needed in program?
 39: What is an abstract class?
 40: Describe the syntax of multiple inheritance.
 41: Describe how an object of a class that contains objects of other classes created?
 42: What is polymorphism? How polymorphism is achieved in C++?
 43: What is pointer?
 44: How pointers are declared and manipulated?
 45: How we make a pointer to an object and member function of class?
 46: What does this pointer Point to?
 47: What are the applications of this pointer?
 48: What is virtual function?
 49: Why do we Need Virtual functions?
 50: When do we make a virtual function “pure”? What are the implications of making a function a pure virtual function?






BCA (Semester 3)
Practical Assignment 3
Subject- OBJECT ORIENTED PROGRAMMING WITH C++


  1. Write a class with data members name, age, weight. Use constructors and destructors for the class.
  2. Use a friend function to find average of a given number.
  3. Use a copy constructor and print the value of an object four times.
4.      Write a program that substitutes an overloaded += operator. This operator should allow statements like c1+=c2, where c2 is added to c1 and the result should be left in c1, display the output.
  1. Define a class string that contains character pointer and the length of the string as data members. Overload + operator to concatenate the two strings.
  2. Define a class string that contains character pointer and the length of the string as data members. Overload + operator to concatenate the two strings.
  3. Create as class student which stores the roll number, name; class test that stores marks obtained in two subjects; class result which contains the total marks obtained in the test. The class result can inherit the details of marks obtained in the test and the roll_no of the student class. Write a main function to implement the above class and display the output.
  4. Write a c++ program that demonstrates class to basic and basic to class conversion
  5. Write a program that defines a generic base class called fruit that describes certain characteristics of fruit. This class is inherited by two derived classes called Apple and Orange. These classes supply specific information to fruit that are related to these types of fruit.
  6. Write a program to accept integer and float values from the user. Write the values in the file and print it on the screen.
  7. Write a program that reads a text file and creates another file that is identical except that every sequence of consecutive blank spaces is replaced by a single space.
  8. Write a program which reads a text from the keyboard and displays the following information on the screen in two columns
1) Number of lines.
2) Number of words.
3) Number of characters.

Comments

Popular posts from this blog

New software continuously scrambles code to foil cyber attacks: Technique sets a deadline on hackers to severely limit chances of success

New software continuously scrambles code to foil cyber attacks: Technique sets a deadline on hackers to severely limit chances of success : As long as humans are writing software, there will be coding mistakes for malicious hackers to exploit. A single bug can open the door to attackers deleting files, copying credit card numbers or carrying out political mischief. A new program called Shuffler tries to preempt such attacks by allowing programs to continuously scramble their code as they run, effectively closing the window of opportunity for an attack.