- 27th Jun 2024
- 18:28 pm
Our Python expert will guide you how to design and implement a course registration system with the following capabilities:
- The system can create a report for each student which includes the student information and the details about the courses that the students have had taken.
- The students can register in different courses of their choice.
The system has requirements including:
- The system admin will register the courses for the students.
- The list of available courses is given in a text file with the following format: a. Course number, Name of the course, Course time and days, Number of credits, Course instructor, Class location, Course pre-requisite b. The courses are separated by newline
- The list of students is given in a text file with the following format: a. Student name, Student ID, Student email address, [List of previous courses separated by comma], [List of the grades in those courses separated by comma], [List of courses currently registered separated by comma] b. The students are separated by newline.
- A student can register in a course if and only if they passed the required prerequisite.
- The admin should be able to register a student in all their selected courses.
- The admin should be able to register all the students in a selected course at once.
- The system should be able to create a report for each student after their registration is done. These reports include the student’s information and information about the courses that the student has registered this semester.
- The system should be able to create a report for each course. These reports include the information about the course and information about the students who have registered in that course.
- The system should be able to create a transcript for each students
Design And Implement A Course Registration System - Get Assignment Solution
Please note that the assignment solution provided here has been crafted by our expert Python programmers. These solutions are intended strictly for research and reference purposes. Our Python tutors would be delighted if you find them helpful in understanding the concepts presented in the reports and code.
For access:
- Option 1: Visit our Python Assignment Sample Solution page to download the complete solution, which includes code, a detailed report, and accompanying screenshots.
- Option 2: Contact our Python tutors for personalized online tutoring sessions tailored to this assignment, where you can have your questions clarified and deepen your understanding.
- Option 3: Explore a partial solution to this assignment in the blog post linked below.
Free Assignment Solution - Design And Implement A Course Registration System
courseList = []
studentList = []
#create a course class to store the course details
class Course:
def __init__(self,course_number,course_name,course_time,course_days,course_credit,course_instructor,course_location,course_prerequisite):
self.course_number = course_number
self.course_name = course_name
self.course_time = course_time
self.course_days = course_days
self.course_credit = course_credit
self.course_instructor = course_instructor
self.course_location = course_location
self.course_prerequisite = course_prerequisite
def __str__(self):
return "Course Number : " + self.course_number + "\nCourse Name : " + self.course_name +"\nCourse Time : " + str(self.course_time) + "\nCourse Days : " + str(self.course_time) +"\nCourse Credit : " + str(self.course_credit) +"\nCourse instructor : " + self.course_instructor +"\nCourse location : " + self.course_location +"\nCourse Prerequisite : " + self.course_prerequisite
#create the student class to store the studnet details
class Student:
def __init__(self,student_Id,student_Name,student_email,previous_course,previous_grade,current_course):
self.student_Id = student_Id
self.student_Name = student_Name
self.student_email = student_email
self.previous_course = previous_course
self.previous_grade = previous_grade
self.current_course = current_course
def __str__(self):
return "Student Id : " + self.student_Id + "\nStudent Name : " + self.student_Name +"\nStudent Email : " + self.student_email +"\nStudent Previous Course : " + str(self.previous_course) +"\nStudent Previous Grade : " + self.previous_grade +"\nStudent Current Course : " +str(self.current_course )
#function to read all the course from the file and store in the list
def readCourse(fileName):
global courseList
try:#open the file in reading mode and store the data
file = open(fileName,"r")
data = file.readline()
while(data):#iterate over the data
data = data.replace("\n","")#remove new line from data
data = data.split(",")
courseList.append(Course(data[0],data[1],int(data[2]),int(data[3]),int(data[4]),data[5],data[6],data[7]))#append the course in the list
data = file.readline()#read the enxt line
file.close()
except Exception as ex:
print(ex)
#function to read all the student from the file and store in list
def readStudent(fileName):
global studentList
try:
file = open(fileName,"r")
data = file.readline()
while data:
data = data.replace("\n","")#remove new line from data
temp = data.split(",")
name = temp[0]
id = temp[1]
email = temp[2]
temp = temp[3:]
#print(temp)
previous_course = []
previous_marks = []
current_course = []
index = 0
tempData =""
#find all the sublist
for i in range(len(temp)):
tempData += temp[i] + ","
if ']' in temp[i]:
if index == 0:
previous_course = tempData[:-1]
index +=1
elif index == 1:
previous_marks = tempData[:-1]
index +=1
else:
current_course = tempData[:-1]
tempData = ""
previous_course_name = []
current_course_name= []
for i in range(len(previous_course)):
for j in courseList:
if previous_course[i] == j.course_number:
previous_course_name.append(j.course_name)
break
for i in range(len(current_course)):
for j in courseList:
if current_course[i] == j.course_number:
current_course_name.append(j.course_name)
break
#append data to the student list
studentList.append(Student(id,name,email,previous_course_name,previous_marks,current_course_name))
data = file.readline()#Read next line
file.close()
except Exception as ex:
print(ex)
#create a function to print the menu
def printMenu():
print("1. Create a report for each student ")
print("2. Student register itself in course")
print("3. Admin register student in the course ")
print("4. Admin register all the student in the course")
print("5. Create report for each course")
print("6. Exit")
choice = input("Enter the choice : ")
return choice
#function to add course to the student
def addCourse():
flag = True
index = -1
id = input("Enter student id in which course needed to add: ")
for i in range(len(studentList)):
if id in studentList[i].student_Id:
index = i
flag = False
break
if flag == True:
print("No student id found with that id")
return
while(True):
flag = False
courseName = ""
prerequisite = []
id = input("Input id of course to add or 'x' to go back: ")
if id == 'x':
break
for i in courseList:
if id == i.course_number:
prerequisite = i.course_prerequisite
courseName = i.course_name
flag = True
break
if flag == False:
print("Course not found with that id")
else:
if courseName in studentList[index].previous_course:
print("Student already completed this course")
elif courseName in studentList[index].current_course:
print("Studen already taking this course")
else:
if prerequisite != "None":
if prerequisite in studentList[index].previous_course:
print("Coruse Added")
studentList[index].current_course.append(courseName)
else:
print("Student does not have prerequisite for this course")
else:
print("Coruse Added")
studentList[index].current_course.append(courseName)
def adminAdd():
while(True):
flag = False
courseName = ""
prerequisite = []
id = input("Input id of course to add or 'x' to go back: ")
if id == 'x':
break
for i in courseList:
if id == i.course_number:
prerequisite = i.course_prerequisite
courseName = i.course_name
flag = True
break
if flag == False:
print("Course not found with that id")
else:
for index in range(len(studentList)):
if courseName in studentList[index].previous_course:
print("Student %s already completed this course"%(studentList[index].student_Name))
elif courseName in studentList[index].current_course:
print("Studen %s already taking this course"%(studentList[index].student_Name))
else:
if prerequisite != "None":
if prerequisite in studentList[index].previous_course:
print("Coruse Added for student %s"%(studentList[index].student_Name))
studentList[index].current_course.append(courseName)
else:
print("Student %s does not have prerequisite for this course"%(studentList[index].student_Name))
else:
print("Coruse Added for student %s"%(studentList[index].student_Name))
studentList[index].current_course.append(courseName)
def writeStudentData(fileName):
try:
file = open(fileName,"w")
for i in studentList:
file.write(i.student_Name)
file.write(",")
file.write(i.student_Id)
file.write(",")
file.write(i.student_email)
file.write(",")
previous_course_id = []
current_course_id = []
for k in i.previous_course:
for j in courseList:
if k == j.course_name:
previous_course_id.append(int(j.course_number))
for k in i.current_course:
for j in courseList:
if k == j.course_name:
current_course_id.append(int(j.course_number))
file.write(str(previous_course_id))
file.write(",")
file.write(str(i.previous_grade))
file.write(",")
file.write(str(current_course_id))
file.write("\n")
file.close()
except Exception as ex:
print(ex)
if __name__ == "__main__":
readCourse("courseData.csv")
readStudent("studentData.csv")
while(True):
choice = printMenu()
if choice == "1":
print("Student List")
for i in studentList:
print(i)
print()
elif choice == "2":
addCourse()
print()
elif choice == "3":
password = input("Enter admin password to contiue: ")
if password == "admin":
addCourse()
else:
print("Wrong Password!!! Try again...")
print()
elif choice == "4":
password = input("Enter admin password to contiue: ")
if password == "admin":
adminAdd()
else:
print("Wrong Password!!! Try again...")
print()
elif choice == "5":
student_registered = []
print("Course list")
for i in courseList:
print(i)
for j in studentList:
if i.course_name in j.current_course:
student_registered.append(j.student_Name)
print("Student regsitered in this course : " + str(student_registered))
print()
elif choice == "6":
print("Student data is written into studentData.csv file")
writeStudentData("studentData.csv")
break
else:
print("Wrong Choice!!! Try again...")
Get the best Python assignment help and tutoring services from our experts now!
About The Author - John Smith
John Smith, an experienced developer specializing in educational systems, presents insights into "Design And Implement A Course Registration System - Free Assignment Solution." With a focus on efficiency and clarity, John's expertise ensures a comprehensive approach to designing and implementing robust course registration systems. His commitment to seamless integration of student enrollment and administrative functionalities empowers users to navigate and optimize academic processes effectively.