谁能帮我做一下java的题

来源:百度知道 编辑:UC知道 时间:2024/06/01 05:58:36
1.Write an interactive Java program to calculate how many years it takes to double your fix-amount of savings in a bank. Suppose the interest rate is fixed.
For example, if user saves 1000 dollars into bank, so at bank interest rate 7%, it may take at least 11 years to have the balance become 2000 dollars. Name your class as DoubleSaving.java, write a method with signature as follows:
2.Please write a command-line application to assign the letter grades to students based on their scores. Your program should first ask the number of students in the class. For each user, it should ask the name of the student and his/her average score. Then, it should calculate the letter grade, and display the name and the letter grade of the student just entered. It should calculate the letter grades as many times as the number of the students given at the beginning of the program.
Your program should calculate the letter grade as follows
For average scores from 90 to 100, the letter

//写完后我彻底崩溃了......

import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeMap;

public class HeyJuly {

private static Scanner san = new Scanner(System.in);

public static int getInt(String info) {
if (info != null)
System.out.print(info);
int in = 0;
in = san.nextInt();
return in;
}

public static String getString(String info) {
if (info != null)
System.out.print(info);
String in = null;
in = san.next();
return in;
}

public static void main(String[] args) {
new DoubleSaving().doubleMon(1);
new StudentScores(5).init();
RandomClass ram = new RandomClass();
ram.print(ram.auto());
PrimeDiagram prime = new PrimeDiagram();
for(int i = 1; i < 21; i ++) {
if(PrimeDiagram.isPrime(i