CompSci 307 Fall 2022 |
Software Design and Implementation |
Computer Science is a science of abstraction, creating the right model for a problem and devising the appropriate mechanizable techniques to solve it. — A. Aho and J. Ullman
Use GIT to push your team's implementation to the master
branch of the provided, shared, oolala_teamNN
repository hosted in the course's Gitlab group.
As your submission for this project, use GIT to add
, commit
, and push
the following:
src/main/java
folder: all project codesrc/main/resources
folder: any images or program filessrc/test/java
folder: all JUnit test codesrc/test/resources
folder: any test program filesYour code is expected to follow the course coding conventions and be reasonably commented.
Your team's project GIT repository must show many, purposeful, commits from all team members rather than just one or two large "kitchen sink" commits and marathon merging or redesign sessions. Specifically, we will be looking for deliberate attempts to regularly:
We strongly suggest using the course's suggested GIT workflow for teams to manage this process.
In teams, write a Java program from scratch using straight OpenJFX (without FXML), that implements three seemingly different CompSci 101 level applications that use a small programming language to operate one or more "turtles" to move or draw with. Details for each application will be provided as the project progresses to help provide concrete examples for your Object-Oriented Language Architecture for Little Applications, OOLALA: a common interpreter for languages based on the similar syntax that allows users to enter programs interactively to be evaluated and visualized in various ways.
While the exact User Interface for each program is up to your team to decide, they should all allow the user to:
The View must use configuration file(s) for the details of its components instead of hard-coded values within your Java code, specifically:
setText()
directly on every GUI element (so perhaps prompting the user at beginning of the program in an introductory screen).The Model must implement basic error checking of the user programs and throw
Exceptions for the View to catch
and report to the user, specifically:
String.format()
: use this method to allow the property value in your file to include variable values and be a single String (rather than concatenated together as you might usually write)Test your program using JUnit 5 test methods (code annotated with @Test
and checked with one or more assertions) that demonstrate your code works as intended. Additionally, use TestFX to simulate common user "actions" that are checked with standard JUnit assertions to verify the UI responds appropriately. Make well named tests that test both "happy" and "sad" possible code paths (here are many, many, many examples in case you are having trouble thinking of possible negative tests):
public
method and more for complex methods)Exception
expected to be thrown (both for when it is thrown and caught directly in the JUnit test for the Model and when it is caught and handled appropriately in the View using TestFX)You are expected to create tests frequently to develop a working rhythm during the coding process rather than waiting until the end.
It is encouraged that you to start simply in order to verify your understanding of the project's core features. Then refactor your code to help it serve as a foundation for the more diverse functionality expected.
The functionality features emphasize design goals, so your focus should be implementing them in such a way as to promote creating abstractions that generalize your core code, not simply as special cases added without a clear plan. Ideally, a well-designed program will make implementing new features easier so, when choosing a new feature to implement, look for something that fits into your design or refactor your code first to accommodate it. Specifically, your design should be thoughtful and intentional: clearly avoiding duplicate code structures and making it easy to add more of these kinds of applications without changing the existing code.
Adding functionality not related to an abstraction or resulting in poor code that diminishes your overall design efforts will not be rewarded. Specifically, the credit you receive for a functionality feature will be in proportion to how clearly it shows that your core classes are closed to modification while open to extension. Thus, a program with fewer features, but plenty of clear paths to easy expansion, is worth more than a program with many features but lacking clean code and good abstractions.
In addition to following the course Code Design Habits Checklist, your project design should clearly show the your progress learning the topics we have discussed so far in the course:
null
or other error prone valuesThis project highlights the following interesting and foundational Computer Science concepts. You are not expected to write a general or complete version of any of these concepts, but learning about them may help provide a context to begin thinking about some design issues or connect your work in this course to the broader computing community.
token
s in the separated strings and their relationship (e.g., Java keywords, operators, and parentheses). During the parsing process, tokens are converted into useful objects and separators are typically thrown out. An error is thrown if the input string contains structural errors (e.g., an incomplete expression or an unrecognized word). The resulting parsed commands are evaluated to run the program (e.g., to control a "turtle" that can move, turn, and draw).public static void main
, so it took about 20 years to figure out how to implement a meaningful version! This project requires steady, consistent, work — only by putting in consistent time each week will you see measurable progress and not have to pull "heroic" all-nighters.
Although this is a team project, everyone has individual responsibilities to the team that can be summed up as follows:
Unfortunately conflicts are likely to occur, so please let the Teaching Team know as soon as possible — even if it has happened just once or twice since it is better to deal with the situation early rather than having a disaster at the end when little can be done to get back on track.