Student - studentld: int - studentName: String - studentCGPA: double Course |- courseld: String |- courseTitle: String |- credit: double - studentList: Student [] - numberOfStudents: int - faculty: Faculty Faculty - facultyld: int - facultyName: String - facultyPosition: String + Course() + Course(courseld, courseTitle, credit) + toString(): String + addStudent(Student): void + dropStudent(studentId): void + addFaculty(Faculty): void + dropFaculty(): void + printStudentList(): void + Student() + Student(studentld, studentName, studentCGPA) + toString(): String + Faculty() + Faculty(facultyld, facultyM facultyPosition) + toString(): String
Student - studentld: int - studentName: String - studentCGPA: double Course |- courseld: String |- courseTitle: String |- credit: double - studentList: Student [] - numberOfStudents: int - faculty: Faculty Faculty - facultyld: int - facultyName: String - facultyPosition: String + Course() + Course(courseld, courseTitle, credit) + toString(): String + addStudent(Student): void + dropStudent(studentId): void + addFaculty(Faculty): void + dropFaculty(): void + printStudentList(): void + Student() + Student(studentld, studentName, studentCGPA) + toString(): String + Faculty() + Faculty(facultyld, facultyM facultyPosition) + toString(): String
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
How to solve this in Java?
![Salary Calculator
Employee Name
Basic Salary
Medical Allowance
Calculate Gross Salary
House Rent
Gross Salary
Advance Tax
Calculate Net Salary
Net Salary](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F78e4bebd-be89-44bf-91c3-494fb55f0ed5%2Fabb6c55b-81a2-45b7-980f-82fce8c3fbdb%2Fw68elop_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Salary Calculator
Employee Name
Basic Salary
Medical Allowance
Calculate Gross Salary
House Rent
Gross Salary
Advance Tax
Calculate Net Salary
Net Salary
![Lab Activities
in Java
A. Defining Multiple Classes
We want to develop a minimal, simple object-oriented application for a university.
A university has three major entities: Students, Faculties and Courses.
• First, we have to identify the relationships among them.
The following relationship diagram shows the relationships among Student, Course and Faculty
class.
8.40
0.3
1
Student
Course
Faculty
Figure 1: Relationship among Student, Course and Faculty
Your job is to define the above-mentioned classes as per the specification mentioned below
and then write a Main/Driver class that demonstrates the functionalities of these classes.
Student
Faculty
Course
- courseld: String
- course Title: String
- credit: double
- studentList: Student []
numberOfStudents: int
- studentId: int
- facultyld: int
- facultyName: String
- facultyPosition: String
- studentName: String
- studentCGPA: double
- faculty: Faculty
+ Student()
+ Student(studentId,
studentName, studentCGPA)
+ toString(): String
+ Faculty()
+ Faculty(facultyld, facultyName,
facultyPosition)
+ toString(): String
+ Course()
+ Course(courseld, courseTitle,
credit)
+ toString(): String
addStudent(Student): void
+ dropStudent(studentId): void
+ addFaculty(Faculty): void
+ dropFaculty(): void
+ printStudentList(): void
B. Developing a Menu-based Application
(Submission Link: https://forms.gle/59uiyabBSWMow6v87)
• Now, we need to develop a menu-based, command line application.
The initial menu may have the following options:
a.
Add
b. Delete
c. Update
d. Print
Search
e.
For each of these options, we may provide further options. Suppose, for 'Add' option, next we
may show the following options:
a. Add a Student
b. Add a Course
c. Add
ad a Faculty
For 'Delete' and 'Update', we may provide the same options.
Print' option, we may further provide the followings:
a. Print all students
b. Print all course
c. Print all faculties
d. Print information of a student
Print information of a course
f. Print information of a faculty
For '
е.
Print
student list and faculty information of a course
g.
h. Print courses taken by a student
• Search is very important feature in our application. For 'Search' option, we may provide the
followings:
a. Search a Student
b. Search a Course
c. Search a Faculty
d. Search whether a student takes a course
e. Search whether a faculty teaches a course
Search courses taken by a student
g. Search courses taught by a faculty
Page 2](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F78e4bebd-be89-44bf-91c3-494fb55f0ed5%2Fabb6c55b-81a2-45b7-980f-82fce8c3fbdb%2Fh6h31hw_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Lab Activities
in Java
A. Defining Multiple Classes
We want to develop a minimal, simple object-oriented application for a university.
A university has three major entities: Students, Faculties and Courses.
• First, we have to identify the relationships among them.
The following relationship diagram shows the relationships among Student, Course and Faculty
class.
8.40
0.3
1
Student
Course
Faculty
Figure 1: Relationship among Student, Course and Faculty
Your job is to define the above-mentioned classes as per the specification mentioned below
and then write a Main/Driver class that demonstrates the functionalities of these classes.
Student
Faculty
Course
- courseld: String
- course Title: String
- credit: double
- studentList: Student []
numberOfStudents: int
- studentId: int
- facultyld: int
- facultyName: String
- facultyPosition: String
- studentName: String
- studentCGPA: double
- faculty: Faculty
+ Student()
+ Student(studentId,
studentName, studentCGPA)
+ toString(): String
+ Faculty()
+ Faculty(facultyld, facultyName,
facultyPosition)
+ toString(): String
+ Course()
+ Course(courseld, courseTitle,
credit)
+ toString(): String
addStudent(Student): void
+ dropStudent(studentId): void
+ addFaculty(Faculty): void
+ dropFaculty(): void
+ printStudentList(): void
B. Developing a Menu-based Application
(Submission Link: https://forms.gle/59uiyabBSWMow6v87)
• Now, we need to develop a menu-based, command line application.
The initial menu may have the following options:
a.
Add
b. Delete
c. Update
d. Print
Search
e.
For each of these options, we may provide further options. Suppose, for 'Add' option, next we
may show the following options:
a. Add a Student
b. Add a Course
c. Add
ad a Faculty
For 'Delete' and 'Update', we may provide the same options.
Print' option, we may further provide the followings:
a. Print all students
b. Print all course
c. Print all faculties
d. Print information of a student
Print information of a course
f. Print information of a faculty
For '
е.
Print
student list and faculty information of a course
g.
h. Print courses taken by a student
• Search is very important feature in our application. For 'Search' option, we may provide the
followings:
a. Search a Student
b. Search a Course
c. Search a Faculty
d. Search whether a student takes a course
e. Search whether a faculty teaches a course
Search courses taken by a student
g. Search courses taught by a faculty
Page 2
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education