Programming assignment:
The purpose of this assignment is to introduce you to beginning
Java programming concepts and to get you to
learn how to edit, compile, and print Java source
code files,
how to run Java applications, how to run Java applets,
and to learn how to print the output
of your Java applications and applets.
Write a Java application, using the class style, similar to the
HelloWorldApp.java in the tutorial
that will print your name and three lines listing your favorite games.
For the hierarchy for your
application you can put
Object - YourApplicationClassName
Write a Java applet, using the class style, similar to the
HelloWorld.java applet in the tutorial
that will print your name and three lines
listing your favorite games
on one of
your web pages.
For the hierarchy for your applet you can put
Object - Component - Container - Panel - Applet - YerAppletClassName
Hand in:
Programming assignment:
The purpose of this program is to give you an opportunity to practice loops and branching statements.
Write both an application and an applet that prints out a random number of things you would like to get for Christmas chosen randomly from a list of 8 or more. Items must be displayed in a random order. Be sure no item is displayed more than once.
Hand in:
Hardcopy of both the applet and the application.
Hardcopy of 3 runs of your application.
The evolution of the Point class.
Programming assignment:
The purpose of this program is to give you a chance to look at other people's
Java code, and see how they organize their classes and use the API,
and also to give you some ideas
about possible projects you might want to do for the class.
Hand in:
the annotated
hardcopy of your applet code with the URL of the original applet
and the URL of your modified applet.
Programming assignment:(Due Fri. Oct. 12)
The purpose of this program is to give you an opportunity to practice
using inheritance, polymorphism, abstraction, and encapsulation.
(1)Write a subclass of the
class designed in lecture and 2 subclasses of your class.
Conceptually, you are designing a person type in the game
and 2 different kinds of that person type. (For example, your
subclass might be Royalty and subclasses of that might be
King and Duke. Your people must be modern day types.)
Each subclass must have at least one new instance variable.
Each subclass of your subclass must call the superclass draw method.
All Persons must fit in a bounding box 400 pixels high and 250 pixels
wide. (They don't have to fill the bounding box, they just can't
be bigger than that.) Your Person should stand on the bottom of the box -
conceptually, standing on the ground.
Your Persons must be drawn facing front. (You will not be graded on
your art.)
All your person classes must have a default constructor - a constructor
that takes no parameters.
Include at least 2 constructors for each of your new classes
(one should be a default constructor)
and access methods
for the new data, if appropriate.
(2) Write a Java application
that creates at least one instance of each class you wrote
and uses access methods to print out the values of the variables.
(3) Write a Java applet that draws
at least one object from each of your classes.
Think about what you want to do for your project for the rest of the course. (You can have 1 partner for the project, but not for this assignment.)
Hand in:(Due Fri. Oct. 12)
Hardcopy of your new subclasses, your application, your applet
and output from your application.
Programming assignment:
work on your Person code
Hand in on Friday:
Assignment:
The purpose of the first part of this assignment is to help you get a feel
for how applets run in
a browser and to help you understand the purpose for each of the
applet methods. Do the first part by yourself - no partner.
The purpose of the second part is to have you develop the
first draft of your project design. If you are going to have a partner,
you must do it together. (Hand in one copy with both names on it.)
The form handed out in class contains a list of different things you can do to an applet while it is running, e.g., move to a different page, scroll the page, etc. On the form mark which methods are called for each thing you do. You must make up the last 5 yourself. The ones you make up must be different from the ones I put on the form. Use the ExtendedSimple applet to find out which methods are called. (You can find the version of the browser in the Help menu.)
Decide on a project to work on for the rest of the class. It can be an applet or an application or both and it can do anything you want, but it must
Prepare a program header for your project and a rough drawing of the graphical user interface (GUI).
Hand in:
The form describing the
things you tried while running the ExtendedSimple applet and
which methods were called for each.(do this yourself)
The program header describing your project and the GUI drawing.(do this
with your partner, if you have one)
Programming assignment: Students! Start your projects! All projects, applets and applications, will use Java 1.2 or higher and will use Swing components (no AWT Components). Remember to convert your html file if your project is an applet.
For this assignment, add at least one of the components you will need. The components must show up, but they don't have to do anything. They also don't have to be in the proper place.
Hand in:
Hardcopy of your project. (Applets must run on the web and applications
must be in your Public directory, so I can run them.)
Programming assignment: Continue working on your GUI. Use the proper layout managers and containers so your GUI is formatted the way you want it.
Hand in:
Hardcopy of your project. (Applets must run on the web and applications
must be in your Public directory, so I can run them.)
Programming assignment:
Add event handling to your project. Make "help" for your project one of
the events that works properly.
Hand in:
Hardcopy of your project. (Applets must run on the web and applications
must be in your Public directory, so I can run them.)
Programming assignment:
Add sound, images, colors, and fonts to your project.
Hand in:NOTHING
Programming assignment:
Add animation to your project.
Hand in on Friday:
Hardcopy of your project. (Applets must run on the web and applications
must be in your Public directory, so I can run them.)
and Before You Ship That Applet
Hand in on Friday: NOTHING
Hand in before you leave:
Final hard copy of your code and critiques of at least 3 other project. (Applets must run on the web and applications
must be in your Public directory, so I can run them.)