suggest me class diagram from my below scenario with relevant features Actor Students,…
- User
suggest me class diagram from my below scenario with relevant features
Actor
Students, Admin
Description
This use case allows Students to Browse the website for multiple things to get course info and course news and Instructor list and their sections
Data
Student Name, his courses, Instructor, and groups as well as news
stimulus
command to enter his information and course info
Response
Send confirmation and give him the ability to browse for course news/info/sections
Comment
The student must sign up for the application before If it got rejected, a notice will appear on the
website. If the request is approved, the student and instructor will receive all his info about courses and instructors and news for the website
website. If the request is approved, the student/instructor will receive all his info about courses/instructors/news for the website
- Assistant
Class Diagram:
Classes and Attributes:
- User
- userId (integer)
- userName (string)
- email (string)
- password (string)
- userType (enumeration: Student, Admin, Instructor)
- Course
- courseId (integer)
- courseName (string)
- courseInfo (string)
- courseNews (string)
- Instructor
- instructorId (integer)
- User
for above class diagram write me PLANTUML CODE
- Assistant
@startuml !define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> !define primaryKey(field) field !define enumeration(name) enum name << (E,#E1F5A9) >>
' Enumerations enumeration(UserType) { Student Admin Instructor }
' Define Table Classes Table(User, "User") { primaryKey(userId): int userName: string email: string password: string userType: UserType }
Table(Course, "Course") { primaryKey(courseId): int courseName: string courseInfo: string courseNews: string }
Table(Instructor, "Instructor") { primaryKey(instructorId): int instructorName: string sections: list }
Table(Section, "Section") { primaryKey(sectionId): int sectionName: string instructorId: int courses: list }
Table(Group, "Group") { primaryKey(groupId): int groupName: string groupMembers: list }
Table(UserGroupRelationship, "UserGroupRelationship") { userId: int groupId: int }
Table(CourseRegistration, "CourseRegistration") { userId: int courseId: int }
' Define Relationships User "1" -- "0.." UserGroupRelationship : "" Group "1" -- "0.." UserGroupRelationship : "" Course "1" -- "0.." Section : "" User "1" -- "0.." CourseRegistration : ""
- User
suggest me a java uml diagram for my below scenario with relevant features and methods:
for this website class student and instructor can register and register include check username and extend invalied username class student. class student and instructor can also login and login include check password and username and extend invalied username and password. class student and instructor and admin can browse and browse include courses and course news and instructors lists and sections. class student and instructor and admin can do communications and communications include students and instrustors.
class student and instructor and admin can also create posts groups and schedules. class instructor and admin can do delete posts and groups and schedules. class instructor and admin can modify posts groups and schedules. class admin can check user information
- Assistant
Here's a UML diagram with relevant classes and methods based on the given scenario.
[image: UML Diagram] open
1. User - userId (Integer) - userName (String) - password (String) - emailAddress (String) - userType (UserType) Methods: + register(): boolean + login(): boolean + browse(): List<Course> + communicate(): void + createPost(): void + createGroup(): void + createSchedule(): void 2. Admin (extends User) Methods: + deleteUser(userId: Integer): void + deleteGroup(groupId: Integer): void + deleteSchedule(scheduleId: Integer): void + modifyPost(postId: Integer): void + modifyGroup(groupId: Integer): void + modifySchedule(scheduleId: Integer): void + checkUserInfo(userId: Integer): User 3. Student (extends User) Methods: + register(): boolean + login(): boolean 4. Instructor (extends User) Methods: + register(): boolean + login(): boolean + createSection(): void + modifySection(sectionId: Integer): void 5. Course - courseId (Integer) - courseName (String) - courseInfo (String) - courseNews (String) - instructor (Instructor) 6. Section - sectionId (Integer) - sectionName (String) - courseId (Integer) - instructorId (Integer) 7. Post - postId (Integer) - content (String) 8. Group - groupId (Integer) - groupName (String) - groupMembers (List<Integer>) // User IDs 9. Schedule - scheduleId (Integer) - startTime (DateTime) - endTime (DateTime) - location (String) Enumeration: 1. UserType - STUDENT - INSTRUCTOR - ADMIN - User
- User
- userId (Integer)
- userName (String)
- password (String)
- emailAddress (String)
- userType (UserType)
Methods:
- register(): boolean
- login(): boolean
- browse(): List
- communicate(): void
- createPost(): void
- createGroup(): void
- createSchedule(): void
- Admin (extends User) Methods:
- deleteUser(userId: Integer): void
- deleteGroup(groupId: Integer): void
- deleteSchedule(scheduleId: Integer): void
- modifyPost(postId: Integer): void
- modifyGroup(groupId: Integer): void
- modifySchedule(scheduleId: Integer): void
- checkUserInfo(userId: Integer): User
- Student (extends User) Methods:
- register(): boolean
- Assistant
@startuml !define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> !define primaryKey(field) field !define enumeration(name) enum name << (E,#E1F5A9) >>
' Enumerations enumeration(UserType) { STUDENT INSTRUCTOR ADMIN }
' Define Table Classes Table(User, "User") { primaryKey(userId): Integer userName: String password: String emailAddress: String userType: UserType }
Table(Admin, "Admin") { Inherits User }
Table(Student, "Student") { Inherits User }
Table(Instructor, "Instructor") { Inherits User }