5 4L. Generics In Java- 1
5.1 Project Overview
Here are the files in your project for the GenerivsPractice package:
.
├── src/
│ └── GenericsPractice/
│ └── Pair.java
└── test/
└── GenericsPractice/
└── PairTest.java
After you read the following, check this:
- This
Pair
class stores two elements of the same generic type. - Implement the
min
method which returns the smaller of the two elements. These elements must be instances of theComparable
interface.
5.2 Rubric
- Project must compile, otherwise no grade.
- Complete JavaDoc for
GenericsPractice.Pair
(5 points) - All tests passing for
GenericsPractice.PairTest
(20 points)
5.3 Project Files
5.4 Opening Project in Visual Studio Code
Download the project files from
Unzip the files to preferably an
ITSC 2214
folder for this class. You must have created this folder before for previous labs.Launch Visual Studio Code. Go to File > Open Folder…, navigate and select the folder where you have extracted the zip file.
5.5 Update the autograder
First, please update your autograder by running:
umm update
5.6 Checking Autograder Feedback
You can check your grade locally by following these steps:
Open a terminal. To open a terminal in Visual Studio Code on different operating systems:
Windows: Press ” Ctrl + ` ” or ” Ctrl + Shift + ` ” to open the integrated terminal.
Mac: Press ” Cmd + ` ” or ” Cmd + Shift + ` ” to open the integrated terminal.
Run the command:
umm grade ./script.rhai
5.7 Submitting your Project
When you are ready to submit your assignment:
Open a terminal. To open a terminal in Visual Studio Code on different operating systems:
Windows: Press ” Ctrl + ` ” or ” Ctrl + Shift + ` ” to open the integrated terminal.
Mac: Press ” Cmd + ` ” or ” Cmd + Shift + ` ” to open the integrated terminal.
You can copy and run the
umm create-submission
command in the terminal, and that should create a zip file with a name similar tosubmission-2024-01-24-15-04-50.zip
.umm create-submission
Submit the
submission-2024-... .zip
file to Gradescope. The submission zip file will appear in the file explorer tab of VS Code. You can right click on this file and click on reveal in explorer (windows) or reveal in finder (mac) in order to find this file. then, you can drag and drop this to gradescope for submission.