I periodically teach an introduction to programming course using Java. I want to give my students some exciting assignments that they can relate to or find interesting. At the very least, I want assignments that make sense and have an internal cohesion (for example, some very bad programming exercises seem contrived just so that you have to use the most recent programming construct covered).To give you an idea of scope, here's what's being covered:The assignments must be in Java, using some external library can be done, but it would need to be a simple API and not a full frameworkVariables, Primitives and StringsConsole input and outputif, for, whileArithmetic and logical operatorsSimple graphics with line and shape drawingStatic methodsOne-dimensional arraysThe students will not go into advanced topics (e.g., no recursion, no emphasis on inheritance). Thus, I'm not looking for complex projects: Have them write a C compiler. I did it when I was 5 and it was the only way I learned!If you have ideas that are more advanced than the scope, please post them on the Challenging question linked below, and not this one.Instead, what I'm looking for are interesting ideas that can be accomplished in a short program. For example:Students can write a console version of the Star Wars Name Generator. This is effectively reading Strings and using substring, but I think it's fun. A similar variation would be a Mad Libs program. I used this one five years ago, and perhaps it's already stale.Using some trig supplied to them, students can draw regular polygons, and create interesting spiral shapes.It's also not out of the question to use some simple animation class with most of the code supplied to them. And if you know a Twitter or Facebook service that can be accessed with a simple API, I would be very interested to know.Please note that this question is different from the Challenging Java questions for beginners Question. I'm not looking for challenging per se, just interesting. I think if students work on something where they can easily answer why would anyone ever want to program that? then they will learn better.Even simple problems like computing Miles per Gallon can be good. Although, if there's a way to update it to be more relevant, all the better. If you have an exercise from somewhere else (a book or a website), please cite the source.To help you think about the typical freshman today, check out the Beloit Mindset list, for many examples that will surely make you feel old.
What are some good assignments for an introductory course, to reach today's students?
java;computer science
Given the constraints, I'd suggest implementing a version of Hangman. It would allow for the students to demonstrate all of the techniques you are introducing them to, without being overly complex.  It can also be used as a developing project as the course progresses.  e.g.  once you have covered strings and variables starts out as a text version e.g.You have 10 guesses left.      * * * E * * TWhat is your next guess?then introduce loops to remove the cut and paste element from the code as the 10 guesses count down...  building up to having line graphics and the stick person being hung / saved at the end of the 5 week course.Like most other people who have experience of recruiting and interviewing programmers, it really makes me cringe that this level of tuition is needed at university, but alas, it probably will continue to be needed until schools treat programming as a serious subject on a par with mathematics or sciences