Posted on Leave a comment

Unit Test in OOPS

Subject: Computer Science

Class: 12 CBSE

Marks (Q1 – Q6: 2 marks each; Q7-9 : 5 marks each)

  1. What is an object?
  2. What is a class?
  3. What is the difference between a class and a structure?
  4. What is the difference between a class and a structure?
  5. What are the main features of OOPs?
  6. What is the difference between a class and an object?
    Write a simple python program that creates a class with a single method.
  7. Write a simple class with init method
  8. Write a Python program to show that the variables with a value assigned in class declaration, are class variables and variables inside methods and constructors are instance variables.
  9. Python program to show that we can create instance variables inside methods.

Leave a Reply