The lab exam is worth 10% of your final grade. It is a closed-book exam, and you must work independently. Any form of collaboration or discussion with other students or use of unauthorized tools is strictly prohibited. This includes:
No use of generative AI tools (e.g., ChatGPT, Bard, CoPilot, etc.)
No use of communication tools to check exam answers with others
Any violation of these rules is considered cheating and will result in disciplinary action and a zero score for the exam. If you have any questions about the exam, please direct them to your lab instructor.
Remember to maintain the highest standards of academic integrity throughout the exam.
Exam Duration
The exam duration is 80 minutes and will be closed for submission automatically at the end of the time. It’s your responsibility to monitor time during the exam.
Exam Requirements
To complete the exam, you may use any PC connected to the Internet and complete the exam on GitHub. Alternatively, you may bring your own laptop if you prefer to.
GitHub with VS Code Option
Any PC connected to the Internet with the following:
Web Browser
GitHub account.
More on this option next.
Personal Laptop Option
You may bring your own laptop with the following tools installed:
An IDE (e.g., IntelliJ IDEA)
Git + GitHub account
Command Line (e.g., Terminal, PowerShell, etc.) to clone the project and push to GitHub
Project Structure
You must keep the source code as a Maven Java project. Changing it to a non-Maven project will render your solution ineligible for grading.
Unit Tests
You should not modify the provided unit tests in any way.
VS Code on GitHub Instructions
If you choose to use VS Code on GitHub:
Accept the assignment (lab exam).
Click on the link to your repository on GitHub.com
Press the key > on your keyboard.
Complete your work and click on the left side icon for source control, type your commit message and click commit.
Exam Submission
Similar to all previous lab activities, you will submit your work on GitHub, which will be used to grade your code automatically. Please complete the practice question below prior to the exam and attempt to submit your answer on the tool you wish to use either VS Code on GitHub or your own laptop.
Please adhere to these instructions carefully to ensure a fair and honest exam experience. Good luck!
Practice Sample Exam Question
Question
A Java application uses a fixed thread pool to execute some tasks by a fixed number of worker threads. Creating threads is always expensive, regardless of the platform your code is running on. This app uses a thread pool, but it ended up creating the thread pool two times and may repeat that multiple times. Fix the current implementation of the MyThreadPool.java class, so it creates a thread pool ONLY once and clients can use it multiple times throughout the life of the application.
NOTE: Do not make changes to any class other than the MyThreadPool class.
Please accept the exam using the link for your class section:
If your instructor is using GitHub classroom, then you should click on your class submission link,
link your GitHub username to your name if you have not already done so, accept the assignment, clone the
repository into your local
development environment, and push the code to the remote repository on GitHub. Please make sure that your
written
answers are included in either a README (Markdown) file or a PDF file.
Lab dues dates are listed on GitHub classroom unless otherwise
noted.
If your instructor is using GitHub classroom, your submission will be
auto-graded
by running the included unit tests as well as manually graded for correctness, style, and quality.
How to submit your lab to GitHub Classroom
The video below demonstrates how to submit your work to GitHub classroom