More sophisticated computer-assisted instruction systems monitor the student\'s
ID: 3778322 • Letter: M
Question
More sophisticated computer-assisted instruction systems monitor the student's performance over a period of time. The decision to begin a new topic is often based on the student's success with previous topics. Modify the program of Exercise 6.36 to count the number of correct and incorrect responses typed by the student. After the student types 10 answers, your program should calculate the percentage that are correct. If the percentage is lower than 75%. display "Please ask your teacher for extra help.", then reset the program so another student can try it. If the percentage is 75% or higher, display "Congratulations, you are ready to go to the next level!", then reset the program so another student can try it. Difficulty Level Exercise 6.35 through Exercise 6.37 developed a computer-assisted instruction program to help teach an elementary school student multiplication. Modify the program to allow the user to enter a difficulty level. At a difficulty level of 1, the program should use only single-digit numbers in the problems; at a difficulty level of 2, numbers as large as two digits, and so on. Modify the program of Exercise 6.38 to allow the user to pick a type of arithmetic problem to study. An option of 1 means addition problems only, 2 means subtraction problems only, 3 means multiplication problems only, 4 means division problems only and 5 means a random mixture of all these types.Explanation / Answer
6.37
import java.util.*;
import java.lang.*;
import java.io.*;
class Evaluation
{
public static void main (String[] args)
{
Scanner scan = new Scanner(System.in);
String anskey[] ={"a","b","c","d","a","b","c","d","a","b"};
String answer;
int correct =0;
System.out.println("Enter the answer keys for 10 questions");
for(int i=0;i<10;i++)
{
answer = scan.next();
if(answer.equals(anskey[i]))
correct++;
}
System.out.println("Correct answers : "+correct);
correct = correct*10;
if(correct <75)
System.out.println("Please ask your tecaher for extra help");
else if(correct >= 75)
System.out.println("Congratulations! you are ready to go to the next level");
}
}
output:
6.38
import java.util.*;
import java.lang.*;
import java.io.*;
class DifficultyLevel
{
public static void main (String[] args)
{
Scanner scan = new Scanner(System.in);
int difficultylvl;
System.out.println("Enter the difficulty level");
difficultylvl = scan.nextInt();
if(difficultylvl == 1)
System.out.println("use only single digit numbers for multiplication");
else if(difficultylvl == 2)
System.out.println("use only two digit numbers for multiplication");
else
System.out.println("use big numbers for multiplication");
}
}
output:
6.39
import java.util.*;
import java.lang.*;
import java.io.*;
class ArithmeticProblem
{
public static void main (String[] args)
{
Scanner scan = new Scanner(System.in);
int arithmetic,a,b;
a=3;
b=4;
System.out.println("Enter the option for arithmetic problem to study");
arithmetic = scan.nextInt();
if(arithmetic == 1)
{
int sum = a+b;
System.out.println("sum ="+sum);
}
else if(arithmetic == 2)
{
int difference = a-b;
System.out.println("difference ="+difference);
}
else if(arithmetic == 3)
{
int multiply = a*b;
System.out.println("multiplication ="+multiply);
}
else if(arithmetic == 4)
{
int divide = a/b;
System.out.println("division ="+divide);
}
else if(arithmetic == 5)
{
int mixed = (a+b)*a;
System.out.println("mixed operation ="+mixed);
}
}
}
output:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.