UNIVERSITY SYLLABUS:EX NO:4
1. Develop with suitable hierarchy, classes for Point, Shape, Rectangle, Square, Circle,
Ellipse, Triangle, Polygon, etc. Design a simple test application to demonstrate
dynamic polymorphism.
step 1:Define the class point.
step 2:Define the method show().
step 3:Teminate the class.
step 4:Define the class shape which extends from point.
step 5:Define the class show() make a call for the super class show().
step 6:Terminate the class.
step 7:Define the class rectangle that extend from the class shape.
step 8:Declar the datamembers l&b in integer.
step 9:Define the method getdata() to get the l and b values.
step 10:Define the show() to display the area.
step 11:Terminate the class.
step 12:Define the class square that extend from the class shape.
step 13:Declar the datamembers a in integer.
step 14:Define the method gdata() to get the a values.
step 15:Define the sarea() to display the area.
step 16:Terminate the class.
step 17:Define the class circle and triangle that extend from the class shape and display the result.
step 18:Define the shapetest and define the main() method in it.
step 19:create objects for the classes rectangle,square,circle and triangle and access their methods.
step 20:display the result.
step 21:Terminate the main and class.
OTHER PROGRAMS:
1. Develop with suitable hierarchy, classes for Point, Shape, Rectangle, Square, Circle,
Ellipse, Triangle, Polygon, etc. Design a simple test application to demonstrate
dynamic polymorphism.
step 1:Define the class point.
step 2:Define the method show().
step 3:Teminate the class.
step 4:Define the class shape which extends from point.
step 5:Define the class show() make a call for the super class show().
step 6:Terminate the class.
step 7:Define the class rectangle that extend from the class shape.
step 8:Declar the datamembers l&b in integer.
step 9:Define the method getdata() to get the l and b values.
step 10:Define the show() to display the area.
step 11:Terminate the class.
step 12:Define the class square that extend from the class shape.
step 13:Declar the datamembers a in integer.
step 14:Define the method gdata() to get the a values.
step 15:Define the sarea() to display the area.
step 16:Terminate the class.
step 17:Define the class circle and triangle that extend from the class shape and display the result.
step 18:Define the shapetest and define the main() method in it.
step 19:create objects for the classes rectangle,square,circle and triangle and access their methods.
step 20:display the result.
step 21:Terminate the main and class.
OTHER PROGRAMS:
1.Write a java program to create HTML file from your actual source file.
2.Develop a java program to calculate factorial number calculation (USE YOUR OWN PACKAGE).
3. Develop a java program to the given number is Armstrong or not. (USE YOUR OWN PACKAGE).
3.Develop a java program to create your own package(pack1,pack2) and use package access modifiers table and prove the all 5 different operation.(Define many methods in package and access that methods using ACCESS MODIFIERS TABLE).Assume your own data.
IMPORTANT NOTE:
1.Complete the pending programs.
2.Get Sign from me.
3.Prepare for viva questions .
4.Study well For UNIT TEST-I
5.I will give prize for first mark in unit test.
No comments:
Post a Comment