Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Course name: object-oriented programming use Bluej programme-Java language Help me to solve it DEFINE THE FOLLOWING JAVA CLASSES (WRITE COMPLETE IAVA CODE) Q1.Implement a Student

image text in transcribed

Course name: object-oriented programming

use Bluej programme-Java language

Help me to solve it

DEFINE THE FOLLOWING JAVA CLASSES (WRITE COMPLETE IAVA CODE) Q1.Implement a Student class. Student class define the following information: a) Student with data: name, Student id, department, and student level. b) Add multiple constructor to Student class (minimum three constructors). c) Write a method named displaylnfo ( ), that prints out the student's information. d) Write toString () method. e) Write the signature for a method that has two parameters, both of type Student, and returns an int value. Q2.Similar to the student class Q1, do the following: Implement an Employee class, Employee object keeps the following information: a) Employee name, phone number, Email address, and salary. All instance variable should be private. b) Add getters and setters methods for all instances variables. c) Write constructor for Employee class. The constructor take as parameter the name, phone, and Email of Employee. d) Write addEmployee method that receives an Employee and adds it to collection. e) Write statements to get the collection size. Q3. Write out the implementation for the classes which matches the following objects creation instruction: studentMap .put("CS202200118", new Student("CS202200118", "Ahmed Hassan", "CS")); studentMap .put("IT202034577", new Student("IT202034577", "Waleed Ibrahim", "IT")); studentMap .put("CNET202104009", new Student("CNET202104009", "Omar Khalid", " ET")); Q4.Write out the declaration for the following: a) Create an object named library that can hold an ArrayList. The elements of the ArrayList are of type eBook. b) Add three elements to the collection in (a). c) Add element in index (2). d) Display the length of ArrayList. e) Delete one element from ArrayList

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions