Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
17 views

Btech (Cse) V Semester - First Java Assignment

Uploaded by

miss.nandini26
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Btech (Cse) V Semester - First Java Assignment

Uploaded by

miss.nandini26
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

B.Tech.

(CSE) V Semester 2024


FIRST JAVA ASSIGNMENT

TOTAL MARKS: - 10

Q1. What is Object Oriented Programming? Also discuss difference between


procedural oriented programming and object oriented programming
with example.

Q2. What is JVM (Java Virtual Machine)? Whether JVM is platform independent
or not? Justify your answer.

Q3. Explain

(A) Data Abstraction and Data Encapsulation

(B) Type casting

(C) Access Specifier

(D) Java Development Kit

(E) Java runtime environment (JRE)

(F) Java API (Application Programming Interface)

Q4. Explain the difference between class, instance and local variable by
giving appropriate example.

Q5. What are constructors? Explain the order of invocation of constructor in a


multilevel hierarchy.

Q6. What are static members? What are the restrictions followed by static
method? main() method is always declared as static, why? Explain it.

Q7. Explain method overriding in Java using suitable example.

1
B.Tech.(CSE) V Semester 2024
FIRST JAVA ASSIGNMENT

Q8. Design a class Complex having a real part (real) and an imaginary part
(imag). Provide methods to perform the following on complex numbers:
1. Add two complex numbers.
2. Multiply two complex numbers.
3. toString() method to display complex numbers in the form: real + i
imag

Q9. Write a Java program to create a class named “Employee” with the
following data member such as Employee Id, Employee Name,
Department, Designation and Salary. Store them in an array of objects.
Input the number of employee from the user at runtime and perform the
following:

1. Display list of employee salary wise in the ascending order.

2. Display list of employee Department wise

Q10. Create a class STAFF having fields: Staff id , Name, Department,


Designation and salary. Write a menu driven program in Java for
following operations:
1) To accept the STAFF record one by one
2) To display the entire STAFF record
3) To sort the record by STAFF name
4) To update STAFF salary by 3%

You might also like