t a university, 3 courses are offered: "Programming", "Databases" and "Software Engineering".Each course is offered by a lecturer.Create for each course an instance of type COURSE (=class) using a constructor (parameters: name of the course and the lecturer).The lecturer is stored in a data member of type LECTURER (=class). The class LECTURER should have at least the data member academic_title.The courses have a maximum of 10 and a minimum of 3 course participants.The courses can be attended not only by our own students, but also by students from other universities.The class STUDENT should have at least the following data members: Matriculation numberUniversityStudents from their own university may take any course.Students from other universities may only take one course.The classes LECTURER and STUDENT should derive from the class PERSON.The class PERSON should have at least the following data members:SurnameFirst nameEmailTask: Create a program with a menu that covers the following situation:1. Registration for a course (including querying student data). Each student has a unique email, meaning there can't be two or more students with the same email in the same course.2. Output of one/all courses with data of the participants. Please note that if there are fewer than 3 participants in a course, an additional message must be displayed - "Course will not take place".3. Output of all courses that are not fully booked yet. The output must include the number of free places, the name of the course and the academic name of the lecturer with its academic title.4. End of program: A message will be displayed stating which participants (=all data members of the class PERSON) have to be notified because your course is not taking place.If necessary (creation, search, and so on), corresponding messages are to be displayed.Permanent storage of the data is not required. The data must only be available at the runtime of the program.Use comments in the source code to document your program.
Question
t a university, 3 courses are offered: "Programming", "Databases" and "Software Engineering".Each course is offered by a lecturer.Create for each course an instance of type COURSE (=class) using a constructor (parameters: name of the course and the lecturer).The lecturer is stored in a data member of type LECTURER (=class). The class LECTURER should have at least the data member academic_title.The courses have a maximum of 10 and a minimum of 3 course participants.The courses can be attended not only by our own students, but also by students from other universities.The class STUDENT should have at least the following data members: Matriculation numberUniversityStudents from their own university may take any course.Students from other universities may only take one course.The classes LECTURER and STUDENT should derive from the class PERSON.The class PERSON should have at least the following data members:SurnameFirst nameEmailTask: Create a program with a menu that covers the following situation:1. Registration for a course (including querying student data). Each student has a unique email, meaning there can't be two or more students with the same email in the same course.2. Output of one/all courses with data of the participants. Please note that if there are fewer than 3 participants in a course, an additional message must be displayed - "Course will not take place".3. Output of all courses that are not fully booked yet. The output must include the number of free places, the name of the course and the academic name of the lecturer with its academic title.4. End of program: A message will be displayed stating which participants (=all data members of the class PERSON) have to be notified because your course is not taking place.If necessary (creation, search, and so on), corresponding messages are to be displayed.Permanent storage of the data is not required. The data must only be available at the runtime of the program.Use comments in the source code to document your program.
Solution
Sure, here is a basic structure of the program in Python:
class Person:
def __init__(self, surname, first_name, email):
self.surname = surname
self.first_name = first_name
self.email = email
class Lecturer(Person):
def __init__(self, surname, first_name, email, academic_title):
super().__init__(surname, first_name, email)
self.academic_title = academic_title
class Student(Person):
def __init__(self, surname, first_name, email, matriculation_number, university):
super().__init__(surname, first_name, email)
self.matriculation_number = matriculation_number
self.university = university
class Course:
def __init__(self, name, lecturer):
self.name = name
self.lecturer = lecturer
self.students = []
def register_student(self, student):
if len(self.students) < 10:
for s in self.students:
if s.email == student.email:
print("Student with this email already registered.")
return
self.students.append(student)
else:
print("Course is fully booked.")
def print_course(self):
print(f"Course: {self.name}, Lecturer: {self.lecturer.surname}, Students: ")
for student in self.students:
print(f"{student.surname}, {student.first_name}, {student.email}")
if len(self.students) < 3:
print("Course will not take place.")
def print_free_places(self):
if len(self.students) < 10:
print(f"Course: {self.name}, Free places: {10 - len(self.students)}, Lecturer: {self.lecturer.surname}")
# Create instances of courses and lecturers
lecturer1 = Lecturer("Smith", "John", "[email protected]", "Professor")
course1 = Course("Programming", lecturer1)
# Menu
while True:
print("1. Register for a course")
print("2. Output of courses")
print("3. Output of courses not fully booked")
print("4. End of program")
choice = input("Choose an option: ")
if choice == "1":
# Register for a course
pass
elif choice == "2":
# Output of courses
pass
elif choice == "3":
# Output of courses not fully booked
pass
elif choice == "4":
# End of program
break
This is a basic structure of the program. You need to implement the functionality for each menu option. For example, for option 1, you need to ask the user for student data, create a Student instance, and register it for a course. For option 2, you need to print all courses with their data. For option 3, you need to print all courses that are not fully booked. For option 4, you need to print all students whose courses will not take place.
Similar Questions
A university registrar’s office maintains data about the following entities: (a)courses, including number, title, credits, syllabus, and prerequisites; (b) courseofferings, including course number, year, semester, section number, instructor(s),timings, and classroom; (c) students, including student-id, name, and program;and (d) instructors, including identification number, name, department, and title.Further, the enrollment of students in courses and grades awarded to studentsin each course they are enrolled for must be appropriately modeled.Construct an E-R diagram for the registrar’s office. Document all assumptionsthat you make about the mapping constraints.
Several lecturers may teach the course throughout the semester. In that case, the course and lecturer are in a ................................ association.One to OneOne to ManyMany to ManyNone of the above
You have been assigned to develop a Course Enrollment and Grade Management System in Java for a university. The system should provide functionality to enroll students in courses, assign grades to students, and calculate overall course grades for each student. The project should demonstrate the effective utilization of static methods and variables to keep track of enrollment and grade-related information across multiple instances of the Student and Course classes. It should also showcase your ability to manipulate object state and define behavior through instance methods.Requirements:Student Class:The Student class should have private instance variables to store student information such as name, ID, and enrolled courses.Implement appropriate access modifiers and provide public getter and setter methods for accessing and updating student information.Design a method to enroll students in courses. It should accept a Course object as a parameter and add the course to the student's enrolled courses.Implement a method to assign grades to students. It should accept a Course object and a grade for the student and update the student's grade for that course. Course Class:The Course class should have private instance variables to store course information such as course code, name, and maximum capacity.Use appropriate access modifiers and provide public getter methods for accessing course information.Implement a static variable to keep track of the total number of enrolled students across all instances of the Course class.Design a static method to retrieve the total number of enrolled students.CourseManagement Class:The CourseManagement class should have private static variables to store a list of courses and the overall course grades for each student.Use appropriate access modifiers to control access to the variables.Implement static methods to add new courses, enroll students, assign grades, and calculate overall course grades for each student.The addCourse method should accept parameters for course information and create a new Course object. It should add the course to the list of courses.The enrollStudent method should accept a Student object and a Course object. It should enroll the student in the course by calling the appropriate method in the Student class.The assignGrade method should accept a Student object, a Course object, and a grade. It should assign the grade to the student for that course by calling the appropriate method in the Student class.The calculateOverallGrade method should accept a Student object and calculate the overall course grade for that student based on the grades assigned to them.Administrator Interface:Develop an interactive command-line interface for administrators to interact with the Course Enrollment and Grade Management System.Display a menu with options to add a new course, enroll students, assign grades, and calculate overall course grades.Prompt the administrator for necessary inputs and call the appropriate methods in the CourseManagement and Student classes to perform the requested operations.Implement error handling to handle cases where invalid inputs are provided or when enrolling students in courses that have reached their maximum capacity.Documentation:Provide comprehensive documentation for the project, explaining the purpose and usage of each class, method, and variable.Describe how static methods and variables are utilized to track enrollment and grade-related information across multiple instances of the Student and Course classes.Include instructions for running the program and interacting with the administrator interface.
Consider an application for a training institute. Here, a participant can enroll for multiple courses. A course can be enrolled by many participants. Assessments are conducted for courses and marks are awarded to participants. A participant is allowed to take assessment only once for a course. A participant can enroll for a course only if he/she has undertaken the prerequisite course. The below relations are created for the application.Participant (ParticipantId, Name, Address)Course (CourseId, Desc, Duration, Prerequisite)Assessment (CourseId, Marks, ParticipantId)Identify the Primary key for Course relation.CourseIdDescDurationPrerequisite
Course(course_id,sec_id,semester)Here the course_id,sec_id and semester are __________ and course is a _________.OptionsRelations, AttributeTuples, SetTuples, AttributesAttributes, Relation
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.