Welcome to your first lab. This first exercise is designed to teach you the basic workflow of updating lab content, running tests, and submitting your coding activities. Note that all coding activities (coding labs, coding challenges, projects), will use a similar workflow of maniuplating code files, testing the code, committing.
If you look within the src/main/java folder, you will find two Java classes, Vehicle.java and Questions.java. The 'Questions.java' file contains code comments with instructions. Please make sure to read these code comments carefully and update the return value of the provided methods accordingly. Note, you are expected to review the content in the program prior to working on these labs. If you are not familiar with the concepts being explored in the lab, please make sure to review the study material first. After making changes to your assignments you are expected to run the tests.
If you look within the src/test/java folder, you will find the Java class 'QuestionsTest.java'. The 'src/test/java' folder will contain your test files. Even if you have prior experience with Java, the concept of testing and TDD (test-driven-development) may be unfamiliar to you. Test cases will be instrumental in completing labs. Test cases are essentially scenarios built that ensure that code in a class such as the QuestionsTest.java. The methods in this class function as a way to check the expected output of code to what is actually output from the current structure of the code. You should never modify the test cases in the labs, as this is likely to break the lab entirely. Every lab has been thoroughly tested to not require any modifications to the tests.
You will also find that there is a file named pom.xml. This is a build file which allows the project to leverage open-source tools, such as the tools used to write test cases, inside of the project. The program used to do this is called Maven. You should never modify this file.
All future labs will involve modifying code in src/main/java such that all the test cases in src/test/java pass. No modifications need to be made here as the code has been written to pass all test cases from the start. You should, however, still run the test cases in GuideTest to familiarize yourself with the process of testing your code. You can run tests generally by clicking the 'run' button (usually drawn like a triangular 'play' button) inside a file containing test cases.