AssignmentsSubmit an assignment
You will create a to-do list editor. This to-do list editor will allow you to add new items, save the list to a file which is read back in to the application when the program starts, and remove items from the list that have been completed. All list items will be displayed for users to look at. There will be an add button and a remove button and a single text field to enter the to-do items.
The project should be commented and include javadocs. Zip all files and submit them once the submit page says it's OK to do so. The project is due by midnight on August 1st.
You will create a layout using Swing widgets as close as possible to the one in the screenshot below. You are required to use at least two different layout managers (grid, box, flow etc.) in the assignment. Submit your .java file by 11:59 PM on 7.26.08.
You will create a particle generator similar to the one shown in class. You will create three different types of particle classes all descended from one abstract Particle class (which you will also create). At a minimum, the Particle class should have an abstract method called draw() that renders the particle to a graphics context, and an abstract method called updatePosition() that changes the coordinates of the particle based on whatever rules you establish. Your subclasses will implement these methods.
Your different particles should have different characteristics. They should be different shapes, possibly different colors, different size etc. Further requirements:
- The particles should rise/fall in an arc
- Your particles should be stored in an ArrayList
- Particles should be removed from the ArrayList when they leave the screen
- Particles should be emitted with some type of varying spread; different particles should follow different paths
- Javadocs for all method implementations and basic class descriptions
Satisfying these core requirements will net you an 83. To get a higher grade you should implement more advanced features, such as:
- Particles change size over time
- Realistic physical models for particle acceleration / deceleration
- Particles change shape (not just size) over time
- Particles change color over time
- Particles attract / repel each other
- Use images (.jpg, .gif etc) as your particles
Include javadoc comments in your main class that outline what additional features you implemented above and beyond the core requirements. Upload all classes and javadocs in a zipped directory. This project is due 7.22 by 12:30 PM.
Homework Assignment 3
Create an animation of your initials moving up and down the screen using Swing instead of Processing. Basically, port homework #1 to use Swing / AWT methods. DO NOT USE TEXT RENDERING METHODS SUCH AS drawString(). When your initials reach either the top or the bottom of the window, they should change direction.
You will create a java app that creates random poetry based on both a set of words that you (the programmer) provides, and a set of words that the user will provide. Although I love nonsensical poetry as much as the next computer programmer, for this assignment the poetry has to make sense grammatically (as much as possible). Details below:
- You must have at least 15 nouns, 10 adjectives, 15 verbs and 10 adverbs. You must use articles (extra credit if they are the correct articles for the nouns / adjectives they precede). Interjections and other parts of speech are encouraged!
- Nouns should only be used once per poem
- At the beginning of the poetry generator, you should invite users to enter up to 5 nouns (ask the users for singular nouns) and 5 adjectives to be added to the lists the generator chooses from. This should be accomplished using the Scanner object.
- You should handle plurals correctly. For example, don't say "The birds is running lightly", say "The birds are running lightly" or "The bird is running lightly". You must include some plural nouns.
- The poems can be structured however you want in terms of paragraphs / stanzas etc. but each poem should be a minimum of five lines.
- The keyword is Random! The poems should be almost completely different from one iteration to the next. Check out the Math.random() method or the Random object to obtain these results.
- Your code should be commented in a style compatible with javadoc
- You must submit your javadoc generated HTML files along with your .java files
- Helpful Hint: Use ArrayLists to store your words!!
Homework Assignment 2
Create a program using regular plain vanilla Java (you can't use Processing). The main class should be defined as follows:
- The class should be named Functionator
- The class should accept an unlimited number of arguments on the command line when it is first launched; for example: java Functionator arg1 arg2 arg3...
- The first parameter people specify is the mode the program should run in: either SUM, AVERAGE, or RMS
- If the user enters SUM as the first argument, the sum of all numbers the user enters afterwards should be printed to the console.
- If the user enters AVERAGE, the average (mean) of all numbers the user enters afterwards should be printed to the console
- If the user enters RMS, the Root Mean Square of all numbers the user enters afterwards should be printed to the console. You can find more info about the Root Mean Square at Wikipedia. You will need to look up commands related to the Math class to complete this part.
- If the user does not enter SUM, AVERAGE, or RMS as the first argument to the program, print an error message stating the problem (and providing acceptable usage) and terminate the application.
- If the user enters SUM, AVERAGE, or RMS as the first argument but does not provide any arguments afterwards provide an error message explaining the problem and terminate the application
- You do not have to provide any other type of error handling for user input besides the two items above. For example, if the user enters SUM car 2 dog 5, it's not your problem if the program crashes. We will learn more robust methods of handling user input later in the course
SUBMIT YOUR JAVA FILE (Functionator.java) TO TURN IN THE ASSIGNMENT. ZIP UP THIS FILE AND LABEL IT WITH YOUR NAME AS PER THE INSTRUCTIONS ON THE SUBMISSION PAGE. DO NOT SUBMIT .class FILES.
Homework Assignment 1
Create an animation of your initials moving up and down the screen. Your initials must be drawn using line, rect, fill, stroke etc. DO NOT USE THE TEXT RENDERING METHODS. When your initials reach either the top or the bottom of the window, they should change direction. Click the link on the top of the page (labelled submit an assignment) for instructions on how to turn the assignment in.
Create an abstract animation. This animation must meet the following requirements:
- Your window size should be 800 x 600
- You must use at least three different shapes
- Each shape must have its own class; there should be at least three classes and thus 4 files (including the main .pde file) in your project
- You must animate at least two properties of your shapes. Example properties include position, size, shape (tricky), color, opacity etc.
- You must include comments describing your project and giving your name and the date in your main .pde file. Each method you create should also have a brief comment describing its purpose and basic functionality.
- It should look cool.