Back to index

plt-scheme  4.2.1
Package Functions | Package Attributes
Car Class Reference
Inheritance diagram for Car:
Inheritance graph
[legend]
Collaboration diagram for Car:
Collaboration graph
[legend]

List of all members.

Package Functions

 Car (String make, String model, int miles, double basePrice)
int milesTraveled ()
String makeAndModel ()
Automobile travel (int miles)
double price (int year)
 Car (int miles, double basePrice)
double price (int year)

Package Attributes

String make
String model
int miles
double basePrice

Detailed Description

Definition at line 14 of file beginnerTest.java.


Constructor & Destructor Documentation

Car.Car ( String  make,
String  model,
int  miles,
double  basePrice 
) [inline, package]

Definition at line 21 of file beginnerTest.java.

                                                              {
    this.make = make;
    this.model = model;
    this.miles = miles;
    this.basePrice = basePrice;
  }

Here is the caller graph for this function:

Car.Car ( int  miles,
double  basePrice 
) [inline, package]

Definition at line 23 of file intermediateTest.java.

                                   {
    this.miles = miles;
    this.basePrice = basePrice;
  }  

Member Function Documentation

String Car.makeAndModel ( ) [inline, package]

Implements Automobile.

Definition at line 31 of file beginnerTest.java.

                        {
    return this.make.concat(this.model);
  }

Here is the caller graph for this function:

int Car.milesTraveled ( ) [inline, package]

Implements Automobile.

Definition at line 28 of file beginnerTest.java.

                      {
    return this.miles;
  }
double Car.price ( int  year) [inline, package]

Implements Automobile.

Definition at line 28 of file intermediateTest.java.

                         {
    if ((2006 - year) == 0) {
      return this.basePrice;
    } else {
      if ((2006 - year) > 0) {
        return this.basePrice - (this.basePrice / (2006 - year));
      } else {
        return this.basePrice + (this.basePrice / (year - 2006));
      }
    }
  }
double Car.price ( int  year) [inline, package]

Implements Automobile.

Definition at line 39 of file beginnerTest.java.

                         {
    if ((2006 - year) == 0) {
      return this.basePrice;
    } else {
      if ((2006 - year) > 0) {
        return this.basePrice - (this.basePrice / (2006 - year));
      } else {
        return this.basePrice + (this.basePrice / (year - 2006));
      }
    }
  }

Here is the caller graph for this function:

Automobile Car.travel ( int  miles) [inline, package]

Implements Automobile.

Definition at line 35 of file beginnerTest.java.

                               {
    return new Car(this.make, this.model, this.miles+miles, this.basePrice);
  }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

double Car.basePrice [package]

Definition at line 19 of file beginnerTest.java.

String Car.make [package]

Definition at line 16 of file beginnerTest.java.

int Car.miles [package]

Reimplemented from Auto.

Definition at line 18 of file beginnerTest.java.

String Car.model [package]

Definition at line 17 of file beginnerTest.java.


The documentation for this class was generated from the following files: