You are on page 1of 2

Exercises

-----------1
2

Write a program to find greatest number in an array


Write a program to sort a numeric array element in
ascending order

Write a program to create a class Book with the following


- attributes:
-isbn, title, author, price
- methods :
i. Initialize the data members through
parameterized constructor
ii. displaydetails() to display the details of the book
iii. discountedprice() : pass the discount percent,
calculate the discount on price and find the amount to
be paid after discount
- task :

Create an object book, initialize the book and display


the details along with the discounted price
Implement a class Employee with appropriate state and
behavior. Write Demo java program to test Employee
object behavior

Write a program to create a class Student with the


following :
- attributes :
StudentId, Name, contactNo, course,fees.
- methods :

i. constructor to populate the objects


ii. display function to display the details of the students
iii. return the coursefees
- task :
Create 5 students and perform the following :
i. display the student details coursewise
ii. display the total fees of all the students

You might also like