Homework

Homework Questions? Ask a Tutor for Answers ASAP

Ask an Expert,
Get an Answer ASAP!

I have a program that I need help with. Java. I have finish…

Customer Question
I have a program...

I have a program that I need help with.

Tutor's Assistant: Is there a specific language you're coding in?

Java. I have finish the assignment but there are errors that I need help debugging

Submitted: 1 month ago.Category: Homework
Show More
Show Less
Ask Your Own Homework Question
Customer reply replied 1 month ago
Write a program to perform statistical analysis of scores for a class of students.The class may have up to 40 students.There are five quizzes during the term. Each student is identified by a four-digit student ID number.The program is to print the student scores and calculate and print the statistics for each quiz. The output is in the same order as the input; no sorting is needed. The input is to be read from a text file. The output from the program should be similar to the following:Here is some sample data (not to be used) for calculations:Stud Q1 Q2 Q3 Q4 Q51234 78 83 87 91 862134 67 77 84 82 791852 77 89 93 87 71High Score 78 89 93 91 86Low Score 67 77 84 82 71Average 73.4 83.0 88.2 86.6 78.6The program should print the lowest and highest scores for each quiz.Plan of AttackLearning ObjectivesYou will apply the following topics in this assignment:File Input operations.Working and populating an array of objects.Wrapper Classes.Object Oriented Design and Programming.Understanding RequirementsHere is a copy of actual data to be used for input.Stud Qu1 Qu2 Qu3 Qu4 Qu51234 052 007 100 078 0342134 090 036 090 077 0303124 100 045 020 090 0704532 011 017 081 032 0775678 020 012 045 078 0346134 034 080 055 078 0457874 060 100 056 078 0788026 070 010 066 078 0569893 034 009 077 078 0201947 045 040 088 078 0552877 055 050 099 078 0803189 022 070 100 078 0774602 089 050 091 078 0605405 011 011 000 078 0106999 000 098 089 078 020Essentially, you have to do the following:Read Student data from a text file.Compute High, Low and Average for each quiz.Print the Student data and display statistical information like High/Low/Average..DesignThis program can be written in one class. But dividing the code into simple and modular classes based on functionality, is at the heart of Object Oriented Design.You must learn the concepts covered in the class and find a way to apply.Please make sure that you put each class in its own .java file.package lab2;class Student {private int SID;private int scores[] = new int[5];//write public get and set methods for//SID and scores//add methods to print values of instance variables.}/************************************************************************************/package lab2;class Statistics{int [] lowscores = new int [5];int [] highscores = new int [5];float [] avgscores = new float [5];void findlow(Student [] a) {/* This method will find the lowest score and store it in an array names lowscores. */}void findhigh(Student [] a) {/* This method will find the highest score and store it in an array names highscores. */}void findavg(Student [] a) {/* This method will find avg score for each quiz and store it in an array names avgscores. */}//add methods to print values of instance variables.}************************************************************************************/package lab2;class Util {Student [] readFile(String filename, Student [] stu) {//Reads the file and builds student array.//Open the file using FileReader Object.//In a loop read a line using readLine method.//Tokenize each line using StringTokenizer Object//Each token is converted from String to Integer using parseInt method//Value is then saved in the right property of Student Object.}}************************************************************************************///Putting it together in driver class:public static void main(String [] args) {Student lab2 [] = new Student[40];//Populate the student arraylab2 = Util.readFile("filename.txt", lab2);Statistics statlab2 = new Statistics();statlab2.findlow(lab2);//add calls to findhigh and find average//Print the data and statistics}Topics to LearnWorking with Text Files//ReadSource.java -- shows how to work with readLine and FileReaderpublic class ReadSource {public static void main(String[] arguments) {try {FileReader file = new FileReader("ReadSource.java");BufferedReader buff = new BufferedReader(file);boolean eof = false;while (!eof) {String line = buff.readLine();if (line == null)eof = true;elseSystem.out.println(line);}buff.close();} catch (IOException e) {System.out.println("Error -- " + e.toString());}}}//How do you tokenize a String? You can use other ways of doing this, if you like.StringTokenizer st = new StringTokenizer("this is a test");while (st.hasMoreTokens()) {System.out.println(st.nextToken());}//How to convert a String to an Integerint x = Integer.parseInt(String) ;
Customer reply replied 1 month ago
Write a program to perform statistical analysis of scores for a class of students.The class may have up to 40 students.There are five quizzes during the term. Each student is identified by a four-digit student ID number.The program is to print the student scores and calculate and print the statistics for each quiz. The output is in the same order as the input; no sorting is needed. The input is to be read from a text file. The output from the program should be similar to the following:Here is some sample data (not to be used) for calculations:Stud Q1 Q2 Q3 Q4 Q51234 78 83 87 91 862134 67 77 84 82 791852 77 89 93 87 71High Score 78 89 93 91 86Low Score 67 77 84 82 71Average 73.4 83.0 88.2 86.6 78.6The program should print the lowest and highest scores for each quiz.Plan of AttackLearning ObjectivesYou will apply the following topics in this assignment:File Input operations.Working and populating an array of objects.Wrapper Classes.Object Oriented Design and Programming.Understanding RequirementsHere is a copy of actual data to be used for input.Stud Qu1 Qu2 Qu3 Qu4 Qu51234 052 007 100 078 0342134 090 036 090 077 0303124 100 045 020 090 0704532 011 017 081 032 0775678 020 012 045 078 0346134 034 080 055 078 0457874 060 100 056 078 0788026 070 010 066 078 0569893 034 009 077 078 0201947 045 040 088 078 0552877 055 050 099 078 0803189 022 070 100 078 0774602 089 050 091 078 0605405 011 011 000 078 0106999 000 098 089 078 020Essentially, you have to do the following:Read Student data from a text file.Compute High, Low and Average for each quiz.Print the Student data and display statistical information like High/Low/Average..DesignThis program can be written in one class. But dividing the code into simple and modular classes based on functionality, is at the heart of Object Oriented Design.You must learn the concepts covered in the class and find a way to apply.Please make sure that you put each class in its own .java file.package lab2;class Student {private int SID;private int scores[] = new int[5];//write public get and set methods for//SID and scores//add methods to print values of instance variables.}/************************************************************************************/package lab2;class Statistics{int [] lowscores = new int [5];int [] highscores = new int [5];float [] avgscores = new float [5];void findlow(Student [] a) {/* This method will find the lowest score and store it in an array names lowscores. */}void findhigh(Student [] a) {/* This method will find the highest score and store it in an array names highscores. */}void findavg(Student [] a) {/* This method will find avg score for each quiz and store it in an array names avgscores. */}//add methods to print values of instance variables.}************************************************************************************/package lab2;class Util {Student [] readFile(String filename, Student [] stu) {//Reads the file and builds student array.//Open the file using FileReader Object.//In a loop read a line using readLine method.//Tokenize each line using StringTokenizer Object//Each token is converted from String to Integer using parseInt method//Value is then saved in the right property of Student Object.}}************************************************************************************///Putting it together in driver class:public static void main(String [] args) {Student lab2 [] = new Student[40];//Populate the student arraylab2 = Util.readFile("filename.txt", lab2);Statistics statlab2 = new Statistics();statlab2.findlow(lab2);//add calls to findhigh and find average//Print the data and statistics}Topics to LearnWorking with Text Files//ReadSource.java -- shows how to work with readLine and FileReaderpublic class ReadSource {public static void main(String[] arguments) {try {FileReader file = new FileReader("ReadSource.java");BufferedReader buff = new BufferedReader(file);boolean eof = false;while (!eof) {String line = buff.readLine();if (line == null)eof = true;elseSystem.out.println(line);}buff.close();} catch (IOException e) {System.out.println("Error -- " + e.toString());}}}//How do you tokenize a String? You can use other ways of doing this, if you like.StringTokenizer st = new StringTokenizer("this is a test");while (st.hasMoreTokens()) {System.out.println(st.nextToken());}//How to convert a String to an Integerint x = Integer.parseInt(String) ;
Customer reply replied 1 month ago
can you help me debug the program I wrote? I need the different cases:test cases
1. working with empty file using just header.
2. working with 1 record in file.
3. working with 15 records
4. 40 records
5. 45 records.
Customer reply replied 1 month ago
Posted by JustAnswer at customer's request) Hello. I would like to request the following Expert Service(s) from you: Live Phone Call.
Answered in 2 hours by:
3/11/2018
Tutor: LogicPro, Engineer replied 1 month ago
LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 13,426
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
Verified
Hi
Ask Your Own Homework Question
Was this answer helpful?
Ask Scott Your Own Question
Scott
Scott
Scott, MIT Graduate
Category: Homework
Satisfied Customers: 3,040
3,040 Satisfied Customers
Experience: MIT Graduate (Math, Programming, Science, and Music)

Scott is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.

DianeDallas, TX

< Previous | Next >

Meet the Experts:

LogicPro

LogicPro

Engineer

13,426 satisfied customers

Expert in Java C++ C C# VB Javascript Design SQL HTML

Manal Elkhoshkhany

Manal Elkhoshkhany

Tutor

4,551 satisfied customers

More than 5000 online tutoring sessions.

Linda_us

Linda_us

Finance, Accounts & Homework Tutor

3,138 satisfied customers

Post Graduate Diploma in Management (MBA)

Chris M.

Chris M.

M.S.W. Social Work

2,636 satisfied customers

Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

F. Naz

F. Naz

Chartered Accountant

2,161 satisfied customers

Experience with chartered accountancy

Bizhelp

Bizhelp

CPA

1,887 satisfied customers

Bachelors Degree and CPA with Accounting work experience

Seanna

Seanna

Tutor

1,781 satisfied customers

3,000+ satisfied customers, all topics, A+ work

< Previous | Next >

Related Homework Questions
4. What is entered into a cell that is typically numeric and
4. What is entered into a cell that is typically numeric and can be used for calculations? A. Function B. Label C. Value D. Tab Question 5 of 20 : Select the best answer for the question. 5. Which is … read more
Cher
Cher
JustAnswer Expert & Mentor;Teacher/Tutor
Masters Degree
1,382 satisfied customers
I have a school assignment; I have to write a motion in
Hello there, I have a school assignment; I have to write a motion in liming regarding "Plaintiff lying to a professor about a stolen laptop" Plaintiff told professor laptop was stolen but one of her f… read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
Mean number of goals scored by the Panthers: 13; Data set:
Mean number of goals scored by the Panthers: 13; Data set: 9,15,14 (what is this missing #)?Thank you!… read more
Brad Summers
Brad Summers
Bachelor of Education
2 satisfied customers
I have a question do want me to type it to you or is there a
i have a question do want me to type it to you or is there a fee that u will charge … read more
Ashok Kumar
Ashok Kumar
Master\u0027s Degree
291 satisfied customers
In a population study 80% are Mexiican American. From the
In a population study 80% are Mexiican American. From the probability chart 1-12f find out what the chances are x=12. P=.0625 … read more
GLENN
GLENN
Master of Mathematics
395 satisfied customers
I just need some help for my Tefl course. I need to make a
Hello. i just need some help for my Tefl course. I need to make a straight-arrow ESA lesson plan for an elementary level class of adults in which the students would learn the vocabulary for finding pl… read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
Choose one of the thirteenth-century literary forms
Choose one of the thirteenth-century literary forms discussed in the lesson "Thirteenth-Century Literature." Find more information about it in an encyclopedia or an anthology of medieval literature. R… read more
GLENN
GLENN
Master of Mathematics
395 satisfied customers
I need help with an excel document. I have an excel document
I have an excel document that requires financial data put in the right columns from financial statement, balance sheet, and cash flow report from Alere Inc. I have the excel document and required financial report. … read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
Which of the following would measure the renal vein function
Which of the following would measure the renal vein function from the testicles to the kidney? Lower limb arterial doppler, lower limb venous doppler, carotid doppler, upper limb arterial doppler, upp… read more
GLENN
GLENN
Master of Mathematics
395 satisfied customers
Im trying to write an equation to test the following
Im trying to write an equation to test the following hypotheses - Districts that provide employee cybersecurity education provide more cybersecurity education opportunities for students than districts… read more
GLENN
GLENN
Master of Mathematics
395 satisfied customers
I have got an audio assignment in Spanish which I had to
I have got an audio assignment in Spanish which I had to translate and submit.. so can you help me with that? … read more
Cher
Cher
JustAnswer Expert & Mentor;Teacher/Tutor
Masters Degree
1,382 satisfied customers
Chapter: 10-11 Assignment: Do some research and write a 2-3
Chapter: 10-11Assignment: Do some research and write a 2-3 page paper on the use of Java in the browser. Pay particular attention to the future of the Java "plug-in" for browsers. Please include a dis… read more
GLENN
GLENN
Master of Mathematics
395 satisfied customers
I need help with my stats hw. Customer Amount of Tip ($)
Customer Amount of Tip ($) Amount of Bill ($) Number of Diners (Y) (X1) (X2) 1 $7.00 $48.97 5 2 $4.50 $28.23 4 3 $1.00 $10.65 1 4 $2.40 $19.82 3 5 $5.00 $28.62 3 6 $4.25 $24.83 2 7 $0.50 $6.24 1 8 $6.00 $49.20 4 9 $5.00 $43.26 3 10 $4.75 $31.36 4 11 $5.25 $32.87 4 12 $6.00 $34.99 3 13 $4.00 $33.91 4 14 $3.35 $23.06 2 15 $0.75 $4.65 1 16 $3.30 $23.59 2 17 $3.50 $22.30 2 18 $3.25 $32.00 2 19 $5.40 $50.02 4 20 $2.25 $17.60 3 21 $5.50 $44.47 4 22 $3.00 $20.27 2 23 $1.25 $19.53 2 24 $3.25 $27.03 3 25 $3.00 $21.28 2 26 $6.25 $43.38 4 27 $5.60 $28.12 4 28 $2.50 $26.25 2 29 $9.25 $56.81 5 30 $8.25 $50.65 5 … read more
GLENN
GLENN
Master of Mathematics
395 satisfied customers
The bank will be minute based. Each customer will be added
The bank will be minute based. Each customer will be added to the queue at a random interval from 1 to 4 minutes. Run the simulation for 480 minutes. Use the following Algorithm: . 1) Choose a random … read more
Raj
Raj
SAP ABAP Consultant
Master\u0027s Degree
27 satisfied customers
Seem to be stuck in Adapted Mind at Level 28 of 4th grade
Seem to be stuck in Adapted Mind at Level 28 of 4th grade math. Can you help with that? … read more
GLENN
GLENN
Master of Mathematics
395 satisfied customers
Can you please help me with the following Countries with a
can you please help me with the following Countries with a socialist background have been moving toward the decentralization of healthcare delivery thereby allowing more of a private sector. … read more
lani_s
lani_s
Bachelor\u0027s Degree
47 satisfied customers
C++ can also gve me the algoritm Part I: Create three
c++ can also gve me the algoritmPart I:Create three arrays: (Be sure to do this first) You can put the data into a file (extra credit) or hard code it in main. The data is as follows:NAMES GRADES AGES… read more
LogicPro
LogicPro
Engineer
13,426 satisfied customers
Drawings that depict existing conditions are often marked
Drawings that depict existing conditions are often marked with A. blue lines indicating future expansion plans. B. the term "graphic FACP required." C. the term "as-built." D. a symbols legend.… read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x