Research Area

Ashutosh Dubey

Wednesday, May 5, 2010

Class and Object Assignment for Lab

Class and Object Assignment for Lab


1. Write a program to create a class CIRCLE enter the radius of a circle and calculate the Area using two functions Input and Output.


2. Write a program to create a class STUDENT enter name, age and salary in Input function and print the output in output function.


3. Write a program to create a class STUDENT enter the name, age and phone no of 3 student in input function and print the output in output function.


4. Write a program to create a class SUM enter 3 numbers in Input function, print the sum in add function and print the average in avg function.


5. Write a program to create a class EMPLOYEE enters as many employee name and salary as user wants and print the values.


6. Write a program to create a class MAX input three values in Input function and print the output in output function


7. Write a program to create a class FACT enter a number and print the factorial of the no.


8. Write a program to create a class FACTORIAL enter a number if the number is less than 5 print the factorial of the number if it is greater than 5 then print the value from 1 to that number(e.g1,2,3……..8).Use appropriate function required.


9. Write a program to create a class NUM enter a number, if the number is less than 10 print the table of the number otherwise check it is even or odd.


10. Write a program to create a class SORTING ,create an integer Array accept 10 values in input function sort them and display in ascending order in output function.[use BUUBLE or SELECTION Sort].

No comments: