CSCI 151 Project 1: Java and Arrays
Overview
In this project, you will create a useful program with Java. Subject to a few requirements, you can do whatever you like, although there are a few suggestions below if you have trouble coming up with something on your own.Materials
- Eclipse
- This project must be completed independently, without a partner.
- Java 10 base classes documentation
Description
Write a Java application. Your program can do anything you like, subject to the following requirements:- You must use Eclipse and Java, with input and output in a Main class.
- You must use an array,
ExtensibleArray
, orArrayList
somewhere in your program. - Your program should use at least one class besides Main.
- The program should do something useful, interesting, or fun. It need not be complex, but it should be something that someone would conceivably want to use.
Suggestions
Here are a few suggestions to get you thinking, if you need them. Even if you choose one of these suggestions, you do not have to do it exactly as described (in fact, you probably shouldn't!).Nim. Write a program to play the game of Nim (either human vs. human, or human vs. computer). This classic game starts with some number of piles of (counters, coins, beans, whatever). On your turn you must choose one of the remaining piles, and take anywhere from one counter up to all the counters in that pile. However, you may only take counters from a single pile on each turn. The winner is whoever takes the very last counter. Here is what part of an imaginary run of your program might look like:
A *** (3) B ******* (7) C * (1) D (0) E **** (4) Your move? A5 You can't take that many counters from pile A! Try again. Your move? E3 A *** (3) B ******* (7) C * (1) D (0) E * (1)
Water Jugs. Reimplement the Water Jug game from CSCI 150 in Java, with an arbitrary number of jugs.
Tic-Tac-Toe or Connect 4. Implement a classic grid-based two-player game such as Tic-Tac-Toe (perhaps on \( n \times n \) boards instead of only \( 3 \times 3 \) ) or Connect 4.
Game of Life or other cellular automaton. Implement the classic Game of Life, or some other cellular automaton.
Academic Integrity
As a reminder:- You may consult online resources (Java tutorials, StackOverflow questions, ...), and you may even use snippets of code you find there, but you must clearly cite them in your project, by adding a comment with the URL of the resource you used along with a short explanation of how you used it.
- You may discuss your project with other students in the class, but you may not look at another student's code, or share your code with another student. If you need help debugging your code, see an instructor or a TA.
What to Hand In
Submit a zip file containing- your whole project, along with
- an evaluation document detailing the intent of your application, any unique and interesting features in your application, and any joys or struggles you encountered in creating your application.
Grading
Any project that meets the first three requirements will receive at least a B.To earn an A, the project must, in the instructor's judgement, exhibit some creativity and have some interesting features; I am happy to give feedback along the way.
original © Mark Goadrich, Hendrix College
revised and extended by Brent Yorgey, Hendrix College