Write a Java application, similar to the Hello.java application, that will print your name. Write a Java applet, similar to the HelloApp.java applet, that will print your name on one of your web pages.
Hand in a hardcopy of both your source code files and the output of both your programs. Email me the URL of the page with your applet. (I will be posting a list of student pages off the class web page - if you do not want your class page published, or if you would like your home page URL published instead (too), let me know in the email message.)
Write a fortune teller in Java. (see sample solutions.) It will produce random fortunes of the form "You will get an A in your Java class and go to Hawaii and get rich." where the phrases are randomly chosen and the number of phrases is randomly chosen. Use this to get a random number (int)( Math.random() * 20) // generates a random number from 0 to 19
Your program must have at least 10 different phrases (Make up your own.). Make both a fortune teller application and a fortune teller applet.
Put your applet on your class page so I can see it. Hand in a hardcopy of both your source code files and the output of 3 runs of your application. (to get all 3 runs in 1 file, type script at the UNIX prompt (type man script if you want
to know more about what you are doing). Then run your program 3 times. Then do
Make your applet come alive with color! import java.awt.Color and change the color of your text with g.setColor(Color.red) where g is your Graphics object. (There are lots of other colors besides red!)
For the Applet class,
the Graphics class, and another class of your choice, draw an inheritance hierarchy and list all the class variables, instance variables, class methods, instance methods, and constants for each.
Look here for the info you will need:
explanations of classes' variables and methods and
lecture material
Add another subclass to the
Rectangle class on the class homepage. Include at least 2 constructors for your new class.
Write a Java application
that creates at least one instance of each subclass (including yours) and uses access methods to print out the values of the variables.
Write a Java applet that draws one object from each of the Rectangle subclasses - including your subclass.
(See sample.)
Hand in hardcopy of your new subclass, output from your application, and email me the url of your applet.
Make this program work by inserting the necessary key words in the lines with "*SLB*" on them.
Note that there may be more than 1 keyword missing on a line.
Email me the url of your working applet BEFORE CLASS THURSDAY The time stamp on the email message must be earlier than
11:30am May 23.
Write an application and an applet that uses
threads. You can modify one of the sample applets in the Sun Java tutorial that uses threads or some other applet that uses threads, or you can make up your own thread code. The applet and application can do the same thing or different things.
Grading of this program - Program points -> 1 point for each line of code that you write yourself (not part of the original sample) or that you modify, up to a max of 50. Style points -> same as usual (see the style sheet handed out on the first day of class) - that means that if you modify some sample code, you have to put the braces under the first letter of the first keyword, comment each end }, ETC.
Hand in hardcopy of your application and your applet. Email me the URL of your applet and the URL(s) of the code you modified.
See CourseRectangle objects
THREADED!!!
See Cool
Multithreaded!!! applet - with source!!!
Study Creating a User Interface from the Sun Java Tutorial,
the
AWT Tutorial and the Java Handbook code samples.
Another good places to look are Phillipp Thorne's Java Homepage, and
Media Elite.
Create the user interface for your project - applet or application. Plan and execute the design of all your components. Put in stubs for the event handlers that you don't have time to implement. Hand in hardcopy of your code and a screen dump if it is an application or email me the URL if it is an applet.
(type man <command> to get instructions for the following UNIX utilities.)
Hand in hardcopy of your code, commented so someone else can understand your code, and a screen dump or hand drawing of your user interface.
No late days will be allowed on this assignment. Hand in your commented code in whatever state it is in and be sure to show up for class on time!
Study the Java Tutorial section on communicating with other programs.
audiotool [ -p ] [ -d device ] [ generic-tool-arguments ] [ audio-file ... ]
audioconvert [ -pF ] [ -f outfmt ] [ -o outfile ] [ [ - i infmt ] [ file... ] ] ...
xview (xv) (CAEN and ITD)
Last Updated by S.L Bartlett on 6/12/96