Arrays, loops and string handling

How would i go about in creating a program to mark and grade a set of multiple choice test results. this is a console program that uses JOptionPane dialog boxes as well.

Read a set of 10 correct answers using JOptionPane dialog box and store the entire answer as on string in one variable. there are no spaces between the letters and the user may enter capital or small letters.

Extract each letter from this string and fill an array with 10 letter answers. this is done in a method Load Answers after the above. when the answers have been written to the array, display a JOptionPane show message box "The information has been saved".

the program must ask the user for the number of students to process, thereafter the program must prompt the user for a student name and therafter for the students 10 answers. use input dialog boxes to achieve this. the 10 answers for the student must be saved in another array.

after successful capture of the marks, show another sucess confrimation dialog box. thereafter compare the students answers with the answers in the answer array. Keep count of the number of answers in the answer key.

store the students name and the number of correct answers in another array(s).Calculate the symbol based on the following
Score Letter Grade
9...10 A
8 B
7 C
6 D
5 E
0...4 F

for each student, display the students name, the number of correct answers and a symbol(Letter grade). Calculate the average number of correct answers for the class and display on the console each students mark and the letter grade, and the class average.

View Answers

Ads

Post Answer

Preview:

Related Tutorials/Questions & Answers:

Arrays, loops and string handlingArrays, loops and string handling How would i go about in creating... correct answers using JOptionPane dialog box and store the entire answer as on string... capital or small letters.
Extract each letter from this string and fill

read string - using loops in Java
read string - using loops in Java Write a program to read a string composed of an unknown number of words, then count the number of words in the string, and Display the longest and shortest words, with first letter Uppercase

Advertisements

Java repeat string without using loops
Java repeat string without using loops
In this section, you will learn how to repeat string without using for loops.
The given example accepts the number of times and iterates the string to the
number of times set by the user without

Java reverse words in a string using only loops
Java reverse words in a string using only loops
In this tutorial, you will learn how to reverse words in a string without
using any inbuilt methods like split() etc, StringTokenizer functiom or any
extra ordinary function Only loops

Sorting String arrays in java - Java Beginners
Sorting Stringarrays in java I have to make an interface... and make appropriate calls to interface to store and sort the arrays. I do... InterfaceStringArray
{
private String[] arr; //ref to array arr
private int

Writing code with multiple Class Methods and String Arrays
In these classes I need to create stringarrays that contain artist names, and be able...Writing code with multiple Class Methods and String Arrays So what I am trying to do is create a code that lists music artists names using user

Writing code with multiple Class Methods and String Arrays
In these classes I need to create stringarrays that contain artist names, and be able...Writing code with multiple Class Methods and String Arrays So what I am trying to do is create a code that lists music artists names using user

Loops
Loops ï??Using for loops, Write a program to simulate
a clock countdown. The program prompts the
user to enter the number of seconds, displays
a message at every second, and terminates
when the time expires. Use method

Arrays Arrays Hi I need help with the following exercises.
Exercise 1: Write a Java application in which the user is prompted for the total number... initialize an array with 10 String values. Randomly select a value from the array

Arrays
called Rebel.java;
2.Create two arrays. One of them must store integer numbers... of a string and not the actual word i.e -> words[1] = "1";
4.Swap the numbers... the numbers in the second array by 3;
7.Print out the contents of both arrays.
8.Swap

arrays
Store a table with students and information (name, ID, password, crypted password, etc) in a multi-dimensional array "stud" Arrays and Strings:
Store a table with students and information (name, ID, password, crypted password

arrays
arrays Write a program to print details of all the months with number of days in a year (Leap or Non Leap year) using array of objects Integer and String

Loops
3.10. LoopsLoops are the essential part of the program that have.... More than one loops can be used several times in a script.
Loops makes easy... instructed for repetition of the code.
PHP Loops
In PHP, like other programming