Activity 4 - More Practice with IntelliJ: Implement the Circle class
For this activity you will be creating a new IntelliJ project starting with some existing source code.
Starting up
- Go to https://skiadas.github.io/SoftwareDevelopmentPracticumCourse/ and then Schedule/Notes -> Activities for Day 1.
- Go to Activity 4 and follow the source code link.
- Right-click on either source code link (zip format), then download the file by selecting Save as. Be sure to save the file in your CS321 directory.
- Unzip the file to create a directory called “basicGraphing-WritingCircleAssignment”.
- In IntelliJ, select File -> New -> Project from Existing Sources.
- Follow the Next buttons until you can choose a project name and location.
- Click Finish to accept the suggested project name and location.
Implement the Circle class.
- Take a look around at the source code you have been given.
- Notice that there are two packages (
shape and ui) and a Main class at the top-level of the src folder.
- The
shape package contains two classes: Circle and Point.
- Try running the code:
- Open “Main.java” and click on the green triangle to the left of
public static void main... to try running the code.
- At this point, the build process should fail with lots of complaints about the
Circle class, which still needs to be implemented.
- In “Circle.java”, add the implementation for the
Circle class that we developed in Activity 3.
- Once you get
Main built and running, try out the simple interactive interface for testing the Circle class.