### 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.

### Assignments CIS 175-01

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:

$A \;= \;P\;\frac{i(1 + i)^n}{(1 + i)^n - 1}$

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();

applet.init();

applet.start();

frame.setSize(300,300);

frame.setLocation(300,300);

frame.setVisible(true);

Demo of applet

Your browser does not support Java

Demo of applet

Your browser does not support Java

Demo of applet

Your browser does not support Java

Demo of applet

Your browser does not support Java

Use the mouse to move the lights.

Your browser does not support Java.   Sketch with the mouse.