Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSF-Questions Arrays, loops and string handling

Have Programming Question? Ask it here!
 
 
 


lee
Arrays, loops and string handling
0 Answer(s)      2 years and 2 months ago
Posted in : Java Server Faces Questions


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.


Advertisement
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
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
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
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
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
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
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
{ public static void main(String args[]) { int num[]= {4,34,5,3,6,8,1
Arrays
the entire answer as one string in one variable.There are no spaces between
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 In PHP, like other programming
use of loops and screenshots
use of loops and screenshots  1.how to use loops in netbeans? 2.how to draw a correct screenshot
Arrays in java
Arrays in java  what is param array in java
Java - Declaring variables in for loops
Java - Declaring variables in for loops  Java - Declaring variables in for loops
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
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
How to read loops in Java
How to read loops in Java  Example that explains how to read loop in Java
Use javascript loops..
Use javascript loops..  Write a Javascript code to create a redirection script based on day of the week
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
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... string: "); var arr=st.split(""); var resulted = new Array
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
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
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  how do you write the code for multipliying 2 double arrays to be in a 3rd double array? here is my code: package employeepay... arguments */ public static void main(String[] args) { double[] values
loops , control structures
loops , control structures  a simple java program to print 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1
LOOPS - Java Interview Questions
LOOPS   how to find out unique number of elements in given array?{1,2,5,3,2,1,1,7,2,3,0,1,5} output is: 1-4 2-3 3-2 5-2 0-1 7-1 i want source code plz help me
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
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
 

 

 

DMCA.com