Home : Course Map : Chapter 4 : Java : Tech :
Exercises
JavaTech
Course Map
Chapter 4

Introduction
Inheritance
  Demo 1
Overriding
  Demo 2a
  Demo 2b
this,super
MoreConstructors
  Demo 3
Abstraction
Interface 
  Demo 4
Casting References
MoreAboutArrays
Object class
Class Summary
Exercises

    Supplements
Override/Overload
Annotation-J2SE5.0
Java Security
Class Loading
Class Verifier
SecurityManager
     About JavaTech
     Codes List
     Exercises
     Feedback
     References
     Resources
     Tips
     Topic Index
     Course Guide
     What's New

 

  1. Expand on the Complex class to make it more useful. Include the following and any other properties you think would be useful :
    1. Additional constructors such as a default with zero real and imaginary values, a constructor that sets its values to that of a complex object taken as an argument, etc.
    2. Provides a static "i" value.
    3. Absolute value method
    4. Inverse value
    5. Multiplication

  2. Create a similar program as BasicHistApplet1.java in Chapter 3: Tech: Histogram except that it uses the BetterHist class and prints out the mean and standard deviation of a distribution.

  3. Create a vector class that includes static methods to carry out dot and cross product operations.

  4. Using objects from the vector class in exercise 3, create a matrix class that carries out vector*matrix multiplication.

 

            Tech
MoreComplexClass
ImprovedHistogram
JavaRandomNums
Vectors & Matrices
Exercises

           Physics
Runge-Kutta 2nd
  Demo 1
Runge-Kutta 4th
  Demo 2
BoundaryVal.Prob
Shooting Method
  Demo 3
Exercises

  Part I Part II Part III
Java Core 1  2  3  4  5  6  7  8  9  10  11  12 13 14 15 16 17
18 19 20
21
22 23 24
Supplements

1  2  3  4  5  6  7  8  9  10  11  12

Tech 1  2  3  4  5  6  7  8  9  10  11  12
Physics 1  2  3  4  5  6  7  8  9  10  11  12

Java is a trademark of Sun Microsystems, Inc.