Homework Assignment 4

Due : 9.30 am, April 5, 2001.


Simple Java Programming Problems

  1. Create a Java programming language solution to Problem 3.10 in the class handout (this is the wind force problem and it should be easy, since you already have the solution in C).

  2. Solve Problem 18.2 in Austin/Chancogne.

  3. Create a Triangle class containing three Point objects and methods for moving a point, and computing the area, perimeter, and centroid of the triangle.

    You can approach this problem in a couple of ways. One possibility is to create two classes Point and Triange (contained in Point.java and Triangle.java) with the latter calling Point as needed. A second possibility is to use the methods in

        import java.awt.Point;
    

For each program, hand in a copy of the program source code, and samples of the program input and output.


Developed in March 2001 by Mark Austin
Copyright © 2001, Department of Civil Engineering, University of Maryland