CompSci 307
Fall 2022
Software Design and Implementation

Team Project: Cell Society

The chess-board is the world; the pieces are the phenomena of the universe; the rules of the game are what we call the laws of Nature. — T. H. Huxley

Animation of Logo turtle drawing a flower

Submitting Your Work

Use GIT to push your team's implementation to the master branch of the provided, sharedcellsociety_teamNN repository hosted in the course's Gitlab group.

As your submission for this project, use GIT to add, commit, and push the following:

Your code is expected to follow the course coding conventions and follow Javadoc conventions.

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.

Specification

In teams, write a Java program from scratch using straight OpenJFX (without FXML), that allows users to simulate Cellular Automata (CA) models, such as those described in the following CompSci 101 level assignments:

Generally, your program should make it easy to animate a variety of CA simulations as a 2D grid (with a number of rows and columns) of cells (with an initial state such as on and off). A simulation's rules (such as whether a cell changes state, is created, or moves to another position in the grid) are applied on each cell "simultaneously" (i.e., based on their current state and that of their neighbors) and then cell states are updated in a second pass (so a cell is affected only by information from their immediate neighbors). The grid's edges represent closed bounds, i.e., cells on the grid's edges should have smaller, partial, neighborhoods than those in the middle, with full neighborhoods (i.e., 8 neighbors).

Simulation rules will be written in Java code but the kind of simulation, its starting configuration, as well as any initial parameter settings will be read from a pair of data files (with appropriate error checking):

While the exact User Interface for setting up and animating a simulation is up to your team to decide, it should allow the user to:

Any colors, fonts, or other appearance styling should be able to be changed dynamically between at least three different options (such as Dark or Light modes, Duke or UNC colors, larger fonts for presentation mode, etc.). Any text displayed should be able to appear in at least three different languages (Pig Latin is a popular option or you can use Google Translate if no one on your team can do it).

Test your program using JUnit 5 (with assertions both for typical situations and all possible thrown Exceptions) to separately verify the Model and View work as intended. Generally, aim to create a test class for each of your concrete classes with at least two well-named tests for each non-trivial public method (more than two are expected for complex methods) and achieve at least 75% Line test coverage of each class.

Deliverables

This project will be submitted in stages:

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.

Design Specifications

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 simulations 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 using abstractions to remove dependencies on concrete classes. 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:

The overall program should still be organized into several packages: some that are intended to be public, consisting primarily of abstractions that are used by other packages, and the rest intended to be private, consisting primarily of concrete subclasses that are not imported or known about directly by other packages.

CompSci Context

This 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.

Individual Responsibilities when Working as a Team

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.

Resources

Experiment online with the Game of Life or NetLogo Fire Simulation.