Examlex

Solved

Consider the Following Statements

question 45

Multiple Choice

Consider the following statements. public class Circle {private double radius; public Circle() {radius = 0.0;} public Circle(double r) {radius = r;} public void set(double r) {radius = r;} public void print() {System.out.println(radius + " " + area + " " + circumference) ;} public double area() {return 3.14 * radius * radius;} public double circumference() {return 2 * 3.14 * radius;}} Circle myCircle = new Circle() ; double r; Which of the following statements are valid in Java? (Assume that console is Scanner object initialized to the standard input device.) (i) r = console.nextDouble() ; myCircle.area = 3.14 * r * r; System.out.println(myCircle.area) ; (ii) r = console.nextDouble() ; myCircle.set(r) ; System.out.println(myCircle.area() ) ;


Definitions:

Interest

A charge for borrowed money, generally a percentage of the amount borrowed.

Maturity Value

The total amount payable to an investor at the end of a fixed-income security's life, including both the principal and interest.

Interest-bearing

Describes a financial instrument or account that generates interest income over time.

Notes Receivable

Claims against debtors documented through promissory notes that promise future payment of money.

Related Questions