Examlex

Solved

Consider the GetArea Method from the Textbook Shown Below

question 33

Multiple Choice

Consider the getArea method from the textbook shown below:
Public int getArea()
{
If (width <= 0) { return 0; } // line #1
If (width == 1) { return 1; } // line #2
Triangle smallerTriangle = new Triangle(width - 1) ; // line #3
Int smallerArea = smallerTriangle.getArea() ; // line #4
Return smallerArea + width; // line #5
}
Which line has the recursive case?


Definitions:

Discount Rate

The interest rate used to discount future cash flows to their present value.

Salvage Value

The assessed salvage value of an asset at the close of its lifespan.

Pretax Return

The income earned by a company before taxes are deducted.

Internal Rate Of Return

The discount rate at which the net present value of an investment project is zero; the rate of return of a project over its useful life.

Related Questions