Examlex

Solved

For the Questions Below, Use the Following Class Definition

question 44

Multiple Choice

For the questions below, use the following class definition.
import java.text.DecimalFormat;
public class Student
{
private String name;
private String major;
private double gpa;
private int hours;
public Student(String newName, String newMajor, double newGPA, int newHours)
{
name = newName;
major = newMajor;
gpa = newGPA;
hours = newHours;
}
public String toString( )
{
DecimalFormat df = new DecimalFormat("xxxx") ; // xxxx needs to be replaced
return name + "\n" + major + "\n" + df.format(gpa) + "\n" + hours
}
}
-Another method that might be desired is one that updates the Student's number of credit hours. This method will receive a number of credit hours and add these to the Student's current hours. Which of the following methods would accomplish this?


Definitions:

Maturity Value

The amount payable to an investor at the end of a fixed-term investment including the principal and the interest.

Compounded Annually

Compounding annually is a method where interest is added to the principal sum at the end of each year, impacting the total interest earned or paid.

Objective

A goal or target that is aimed to be achieved, often used in planning and strategy contexts.

Compounded Semi-Annually

Interest on an investment that is calculated twice a year and added to the principal sum, affecting the total interest earned.

Related Questions