You are on page 1of 4

END SEM LAB EXAM-2021

NAME : SRISOWMIYA.N
REGNO : 119011012658
CLASS : B.TECH (CSE)
YEAR : 2
BATCH : 2019-2023
SEMESTER : 3
SUBJECT : OBJECT ORIENTED PROGRAMMING

SUBJECT CODE : XCS304


EXAM : END SEM LAB
DATE : 12-1-2021
DAY : TUESDAY
1) (53) write a program to display about yourself using class and
object
AIM:

To write a program to display about yourself using class and object.

PROCEDURE:

Step 1: start the program

Step 2: Declare the necessary variable and header files

Step 3: class name is created,

Class student

Step 4: Declare name, roll no, of student details and other 25 fields about
yourself in private access specifier.

Private:

Char name [20];

Step 5: And declare the public access specifier in that we include cout and cin
operations.

Step 6: show the input using void show ()

Step 7: print the result.

Step 8: stop the program.

RESULT:

Thus the program has been created and executed successfully.


PROGRAM:

OUTPUT:

2) (65) write a java program to calculate perimeter of circle.


AIM:

To write a java programs to calcite the perimeter of circle.

PROCEDURE:

Step 1: start the program

Step 2: Include the necessary header files.

Step 3: Include public static void main (string arg []) for declaring some
variables.

Step 4: And include system.out.printin () for scanning the input otherwise print
the statement.

System.out.printin (“enter the radius”);

Step 5: Include the double for while giving the value is under double condition.

Double r=s.nextdouble ();

Step 6: print the result.

Step 7: Stop the program.

RESULT:
Thus the above java program has been created and executed successfully.
PROGRAM:

OUTPUT:

You might also like