Arrays, loops and string handling

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









Related Tutorials/Questions & Answers:
Arrays, loops and string handling
Arrays, 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 String arrays 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 string arrays 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 string arrays 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
String Arrays Java
String Arrays Java          String array cannot hold numbers or vice- versa. Jsp arrays can only store the type of data specified at the time of declaring
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
Loops
Loops  Write code that uses nested loops to print the following patterns: Pattern1: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 6 Pattern 2: 1 2 3 4 5 6 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1
Loops
Loops  Write code that uses nested loops to print the following patterns: Pattern1: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 6 Pattern 2: 1 2 3 4 5 6 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1
Loops
Loops  by using drjava q1.Write code that uses nested loops to print the following patterns: Pattern1: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 6 Pattern 2: 1 2 3 4 5 6 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 q2.Write code
arrays
arrays  using arrays in methods   Java use arrays in methods import java.util.*; class ArrayExample{ public static int getMaxValue...]; } } return minValue; } public static void main(String[] args
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
arrays
word appears in the passage.   The given code accepts the string text... CountWordOccurrence { public static void main(String[] args){ Scanner input=new Scanner(System.in); System.out.print("Enter string: "); String
arrays
word appears in the passage.   The given code accepts the string text... CountWordOccurrence { public static void main(String[] args){ Scanner input=new Scanner(System.in); System.out.print("Enter string: "); String
arrays
word appears in the passage.   The given code accepts the string text... CountWordOccurrence { public static void main(String[] args){ Scanner input=new Scanner(System.in); System.out.print("Enter string: "); String
arrays
arrays  public class Country{ string countryName; string location; int population; double area; } a.write a java statement to create an array of 10 country objects called mycountry using the Country class. b.Assuming
Arrays
the entire answer as one string in one variable.There are no spaces between
arrays
{ public static void main(String args[]) { int num[]= {4,34,5,3,6,8,1
nested for loops
, or above minimum wageTODO add your handling code here: int columns = 2... totalPayment = 0.00; double averageWages =0.00; double minWage =7.00; String report..."); } } } }   Close your loops before going
Loops
3.10. Loops Loops 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 ADS_TO_REPLACE_1 In PHP, like other
loops
Loops
Loops
loops
loops
loops
Arrays in java
Arrays in java  what is param array in java
C Array of String
C Array of String       In this section you will learn how to create an array of string in C. A String is an array of char objects. An array of string can be declared
use of loops and screenshots
use of loops and screenshots  1.how to use loops in netbeans? 2.how to draw a correct screenshot
ModuleNotFoundError: No module named 'loops'
ModuleNotFoundError: No module named 'loops'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'loops' How to remove the ModuleNotFoundError: No module named 'loops'
pattern-using loops
pattern-using loops  Write a program that displays the following pattern ... (use nested loops... A { public static void main(String[] args) { for(int i=0;i<5;i
Using Nested loops
Using Nested loops  How to use nested loops in java when I want to print the 10 multiples of numbers 2 to 15(in multiplication table)   public class MultiplicationTable{ public static void main(String[] args) { int
Java - Declaring variables in for loops
Java - Declaring variables in for loops  Java - Declaring variables in for loops
java arrays
java arrays  how do you write the code for multipliying 2 double arrays to be in a 3rd double array? here is my code: package employeepay... the command line arguments */ public static void main(String[] args) { double
Introduction to java arrays
Introduction to java arrays   ... of Arrays in Java Programming language. You will learn how the Array class... arrays. To meet this feature java has provided an Array class which abstracts
java loops - Java Beginners
? Q4- Write a program to sum the series- 2/9-5/13+8/17......... Q 5...- write a program to to check whether two arrays are identical? Q7- write a program to reverse a string using another array and without using another array
java arrays
java arrays  can i know how can we intilize the three dimentional arrays in java? and how can we assign thae values to that array
java arrays
java arrays  i need a java program to store student details like id,name,addr,marks,average,total..using arrays..input data using scanner class and by using class, object and constructor
LOOPS !! - Java Interview Questions
LOOPS !!  i have string "Hello" i want to print like H He Hel...; String s="Hello"; System.out.println(s.length()); System.out.println...(String[] args) { String st="Hello"; for(int i=1;i<6;i++){ String
Use javascript loops..
Use javascript loops..  Write a JavaScript code to find a number of unique letters in string. (Eg. if keyword is Tajmahal, Tajmahal count will be '5... = window.prompt("Enter string: "); var arr=st.split(""); var resulted = new Array
STRING.....
STRING.....  plzz sent me d code for counting vowels in a string... gui programme
Java with Arrays
Java with Arrays  I was given the assignment to create two parallel arrays; both of size 50 (declares 50 as a constant) One is an array of strings... and store it in the arrays. The input for the problem should be provided in a text
string
string   difference detween "public static void main (String[] args) " and "public static void main (String args[])" in java but it executes both... "String args[]" can mean a "string array called args which is an array
Use javascript loops..
Use javascript loops..  Write a Javascript code to create a redirection script based on day of the week
How to read loops in Java
How to read loops in Java  Example that explains how to read loop in Java

Ads