Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

GuiMain.java You are provided with this starter code. It contains the main function. In the main function a department object is created by using the

image text in transcribedimage text in transcribedimage text in transcribed

GuiMain.java You are provided with this starter code. It contains the main function. In the main function a department object is created by using the createDepartment() function. Use this department object to create a login screen object. Login Screen This is the first screen of your application. User needs to provide an email of an instructor in order to successfully login to the system. Login Emal: Login Figure 1 After a successful login, a new frame is created for the instructor with inputted email. Let's call it the Instructor Frame. The login frame continues running as seen in Figure 2. Instructor Frame If user inputs reyyan.yeniterzi@ozyegin.edu.tr, an instructor frame with Professor Yeniterzi's courses will be created. Remember that Professor Yeniterzi is giving two courses. department.assignInstructorToCourse ("Reyyan Yeniterzi", "CS102"); department.assignInstructor ToCourse "Reyyan Yeniterzi", "CS560"); A frame with two tabbed panes will be created as seen in Figure 2. One for CS102 and another for CS560. A starter code for instructor frame (InstructorFrame.java) is provided to you. The code has the necessary part for you to implement the tabbed panes. Login Email: eyyan.yeniterzlozyegin.edu.tr Login CS102 S560 List Students Register Exam Grades List Grades Figure 2 An instructor can do three things with a course. 1. List Students: The enrolled students are listed as shown in Figure 3. - CS102 C5560 List Students Register Exam Grades List Grades ID aa0004 mk0005 ak0006 90007 bc0008 Name Ayse Akar Mehmet Kaya Ahmet Kaya Gizem Caliskan Burak Celkoglu Email ayse.akar Cozu.edu.tr mehmet.kaya ozu.edu.tr ahmet.kaya Cozu.edu.tr gizem.caliskan ozu.edu.tr burak.celkogluCozu.edu.tr Figure 3 2. Register Exam Grades: Exam grades are entered for an exam. - CS102 CS560 List Students Register Exam Grades List Grades Enter Exam Id: 1 ID Name Grade aa0004 Ayse Akar 10 mkooos Mehmet Kaya 20 ako006 Ahmet Kaya 30 90007 Gizem Calskan bc0008 Burak Celkoglu 501 Save 3. List Grades: Grades of the enrolled students are displayed for the registered exams, together with the exam average. CS102 CS560 List Students Register Exam Grades List Grades Name ID aa0004 mk0005 ak0006 gc0007 bc0008 Average Ayse Akar Mehmet Kaya Ahmet Kaya Gizem Caliskan Burak Celikoglu 1 10 20 30 40 50 30.0 Figure 5 In order to show different output for these three functionalities, you need to clear the previous components in the panel. You can do this with removeAll() function. After adding the necessary components to the panel you can call the revalidate() and repaint() functions to refresh the panel. You have already implemented the necessary functions to get the enrolled student lists, register grades, get student exam grades and calculating exam average. You just need to call these functions when necessary. On the other hand, you are free regarding the design part of the GUI part. Feel free to choose a component which you think will work. As long as you display the same content, you are free to display it any other format you want. While implementing the view and the controller, you are free to make necessary changes in your model. Overall make sure that your model is separate then the view and the controller. You will learn about exception handling on Lecture 13. During the project, you are responsible from handling any necessary exceptional cases. One way to handle those exceptions is to use pop-up windows. Use GuiMain.java as an example main. Your project will be tested will different department objects. Department created in this class is only a sample. Try to test your program with different test cases. GuiMain.java You are provided with this starter code. It contains the main function. In the main function a department object is created by using the createDepartment() function. Use this department object to create a login screen object. Login Screen This is the first screen of your application. User needs to provide an email of an instructor in order to successfully login to the system. Login Emal: Login Figure 1 After a successful login, a new frame is created for the instructor with inputted email. Let's call it the Instructor Frame. The login frame continues running as seen in Figure 2. Instructor Frame If user inputs reyyan.yeniterzi@ozyegin.edu.tr, an instructor frame with Professor Yeniterzi's courses will be created. Remember that Professor Yeniterzi is giving two courses. department.assignInstructorToCourse ("Reyyan Yeniterzi", "CS102"); department.assignInstructor ToCourse "Reyyan Yeniterzi", "CS560"); A frame with two tabbed panes will be created as seen in Figure 2. One for CS102 and another for CS560. A starter code for instructor frame (InstructorFrame.java) is provided to you. The code has the necessary part for you to implement the tabbed panes. Login Email: eyyan.yeniterzlozyegin.edu.tr Login CS102 S560 List Students Register Exam Grades List Grades Figure 2 An instructor can do three things with a course. 1. List Students: The enrolled students are listed as shown in Figure 3. - CS102 C5560 List Students Register Exam Grades List Grades ID aa0004 mk0005 ak0006 90007 bc0008 Name Ayse Akar Mehmet Kaya Ahmet Kaya Gizem Caliskan Burak Celkoglu Email ayse.akar Cozu.edu.tr mehmet.kaya ozu.edu.tr ahmet.kaya Cozu.edu.tr gizem.caliskan ozu.edu.tr burak.celkogluCozu.edu.tr Figure 3 2. Register Exam Grades: Exam grades are entered for an exam. - CS102 CS560 List Students Register Exam Grades List Grades Enter Exam Id: 1 ID Name Grade aa0004 Ayse Akar 10 mkooos Mehmet Kaya 20 ako006 Ahmet Kaya 30 90007 Gizem Calskan bc0008 Burak Celkoglu 501 Save 3. List Grades: Grades of the enrolled students are displayed for the registered exams, together with the exam average. CS102 CS560 List Students Register Exam Grades List Grades Name ID aa0004 mk0005 ak0006 gc0007 bc0008 Average Ayse Akar Mehmet Kaya Ahmet Kaya Gizem Caliskan Burak Celikoglu 1 10 20 30 40 50 30.0 Figure 5 In order to show different output for these three functionalities, you need to clear the previous components in the panel. You can do this with removeAll() function. After adding the necessary components to the panel you can call the revalidate() and repaint() functions to refresh the panel. You have already implemented the necessary functions to get the enrolled student lists, register grades, get student exam grades and calculating exam average. You just need to call these functions when necessary. On the other hand, you are free regarding the design part of the GUI part. Feel free to choose a component which you think will work. As long as you display the same content, you are free to display it any other format you want. While implementing the view and the controller, you are free to make necessary changes in your model. Overall make sure that your model is separate then the view and the controller. You will learn about exception handling on Lecture 13. During the project, you are responsible from handling any necessary exceptional cases. One way to handle those exceptions is to use pop-up windows. Use GuiMain.java as an example main. Your project will be tested will different department objects. Department created in this class is only a sample. Try to test your program with different test cases

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

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions