0% found this document useful (0 votes)
2 views1 page

Assignment 1 Java

Uploaded by

Lalit Bist
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Assignment 1 Java

Uploaded by

Lalit Bist
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Assignment 1

1. What are object oriented concept?


2. Demonstrate the example of class and an object.
3. Use the methods – nextInt() , nextLine() , nextFloat() ,
nextBoolean(),nextByte(),nextDouble(),nextLong(),nextShort()
4. Write a program which demonstrate the example of polymorphism.
5. Write a program to use following operator:
Arithmetic operators (+,-,/,%,*,++,--) , Assignment operators(=,+=)
Comparison operators(<,>,<=,>=,==,!=) , Logical operators(&&,||,!)
6. Write a program for grading system where marks will be entered from user and
grade will be printed on screen corresponding to marks (use if…else)
7. Write a program to define a class student with four data members such as name ,
roll no. , sub1, sub2. Define appropriate methods to initialize and display the values
of data members . also calculate total marks and percentage scored by student.
8. Perform various arithmetic operations using switch keyword.
9. Write a program to use constructor.
10. Write a program to take input number from user and then print table of number
entered by user using loops (while , for )

You might also like