Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Write a description of class CreateQuiz here.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class Quiz implements Measurable
- {
- String letterGrade = "";
- double score = 0.0;
- public double getMeasure()
- {
- return score;
- }
- public Quiz(double score, String letterGrade)
- {
- this.score = score;
- this.letterGrade = letterGrade;
- }
- }
- //Tester
- import java.util.Arrays;
- /**
- * Write a description of class BankAndCountryTester here.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class BankAndCountryTester
- {
- public static void main(String[] args)
- {
- Quiz[] quizes = new Quiz[3];
- quizes[0] = new Quiz(90,"A");
- quizes[1] = new Quiz(80,"B");
- quizes[2] = new Quiz(70,"C");
- Double averageScore = Data.average(quizes);
- Quiz maxQuiz = (Quiz)Data.max(quizes);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement