CIS175 Java Programming
My Description of the course.
(This is not the official course description.)
3 Credit Hours
Prerequisite: CIS 150 or permission of the Instructor
The Java programming language will be used to
create stand-alone applications
and World-Wide-Web pages with "dynamic content."
By using Java applets,
web pages can include audio, animation, interactivity,
video and even
three-dimensional imaging. This course will include
an in-depth coverage of Java
including: object orientation, methods, classes,
inheritance, polymorphism, linked
data structures, and creating and using applets.
Lecture Notes are on S: drive.
Formula for
Programming Exercise 3.15 from wikipedia.org
The calculation used to arrive at the periodic payment amount
assumes that the first payment is not due on the first day of
the loan, but rather one full payment period into the
loan.
While normally used to solve for A, it can be used to solve for
any single variable in the equation provided that all other
variables are known.
The formula is:

Where:
A = periodic payment amount
P = amount of
principal (be sure to subtract any down-payments first!)
i= periodic
interest rate
n= total number of payments (for a 30-year loan with monthly
payments, n = 30 years x 12 months = 360)
Help on program 12.17
To run an application from an applet do the following:
- Create a new instance of the application
- Display it by using the show() method.
Example:
ApplicationClass application = new ApplicationClass();
application.setSize(300,300);
application.setLocation(350,350);
application.show();
To run an applet from an applet do the following:
- Create a new frame
- Create an instance of the applet
- Add the applet to the frame
- Run the applet's init() and start() methods
- Display the frame
Example:
JFrame frame = new JFrame("Title");
AppletClass applet = new AppletClass();
frame.getContentPane().add(applet);
applet.init();
applet.start();
frame.setSize(300,300);
frame.setLocation(300,300);
frame.setVisible(true);
Demo of applet
Demo of applet
Demo of applet
Demo of applet
Use the mouse to move the lights.
Download Source Code for Christmas Tree Applet
Sketch with the mouse.
Useful Links
How to create
applet in NetBeans IDE
Another good textbook.Publishers
Companion Web Site Includes true/false exercises for each chapter.
JavaBat java practice problems
Fun Stuff
The Applet ArcadeCheck
this site out. Many of the applets make the source code available.
Return to Prof Kelly
Last Updated
February 28, 2013