Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write the code for these classes in java. The specification for the classes is attached below. Task 1: Design UML Diagram and Classes. (6

Please write the code for these classes in java. The specification for the classes is attached below.

image text in transcribed

Task 1: Design UML Diagram and Classes. (6 marks) Design and draw an UML diagram (0.25 marks), and write the code for the following classes: 1. User class. (1 mark) - The purpose of this class is to maintain a general user information and methods that will be used by the user registration system. - User class must have 6 attributes: identity number, first name, last name, username, password, and user type. 2. Staff class. (0.5 mark) - The purpose of this class is to keep the staff's information. - Staff class has one attribute more than user class which is position. 3. Student class. (0.5 mark) The purpose of this class is to keep the student's information. - Student class has two attributes more than user class which are course, degree. 4. Book class. (1 mark) -The purpose of this class is to keep the book's information. -Book class must have seven attributes which are identity number, ISBN number, call number (e.g., 005.133/JAV-1/54 c.4), title, abstract, publisher and status of a book (e.g., Active or Removed). 5. Author class. (1 mark) -The purpose of this class is to keep the author's information. - Author class has five attributes which are identity number, title, first name, middle name and last name. 6. Location class. (0.5 mark) - The purpose of this class is to keep the location's information. - Location class has four attributes which are identity number, campus name, floor and shelf number. 7. Book-Author records Class. (0.5 marks) - The purpose of this class is to keep the book's authors information. Since a book can have many authors, we will keep each author id, its order (e.g., 2 as the second author) and the book id in this record. - Each record should have its own identity number for indexing purpose. 8. Book-Location records Class. (0.25 marks) - The purpose of this class is to keep the book's location information. Since many books can be assigned to the same location, we will keep each book id and the location id in this record. Note that you may not need to construct this Book-Location records class, but you will need to use Map to keep these records in the system. 9. User Type (Enum class) (0.5 marks) - It contains Student, General Staff, Admin Staff, Academic Staff, Librarian. -The abbreviation of each record should be designed and used in the code instead of its full name. -It should have a method to obtain its full name. -The toString method outputs all detail

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

Trucking Industry IRS Audit Techniques Guide

Authors: Internal Revenue Service

1st Edition

1304135640, 978-1304135643

More Books

Students also viewed these Accounting questions

Question

Design a job advertisement.

Answered: 1 week ago