| Program |
Objective |
Problem |
Demo Program |
Sample Output |
| 1.1 |
Write a Java Program to define a class, describe its constructor, overload
the Constructors and instantiate its object |
Write a class student having attributes name(String), regno(int), marks1(int), marks2(int) and marks3(int). It should have
a null constructor student(), copy constructor student( student S) and parameterized constructor
student(String n,int r,int m1,int m2,int m3). For displaying the values it also has a method display().
|
studentdemo.java |
studentdemo.txt |
| 1.2 |
Write a Java Program to define a class, define instance methods for setting and
Retrieving values of instance variables and instantiate its object |
Write a class emp having attributes name(String), id(int) and address(String). It has a method
getdata(String name,int id,String address) for retrieving data and a method putdata() for displaying it's attributes.
|
empdemo.java |
empdemo.txt |
| 1.3 |
Write a Java Program to define a class, define instance methods and overload them and use
them for dynamic method invocation. |
Write a class add having a method display(int a,int b) for adding two integers a method display(double a,double b)
for adding two double values.
|
add_demo.java |
add_demo.txt |