SlideShare una empresa de Scribd logo
1 de 6
Description: Unit 9 - Java Arrays and Data Files
This unit is really about three different topics that are related to
one another – arrays in Java, simple text files in Java, and
modular programing in java (Java methods).
The unit has a programming project spread over three related
programming assignments, each worth 10 points.
In the first assignment, you will create a Java program that
works with a small array of data containing five test scores. It
will get data from user input do some calculations, and then
print the results.
In the second assignment, you will modify a copy of the first
assignment to load the data from a data file into an array, and
then output the results to a data file.
In the third assignment, you will decompose a copy of the
second assignment into separate methods in Java.
Our goal is to have a good modular program that loads stored
data from a fie into an array, works with the data, then sends
results to another data file. Doing this in three parts will allow
you to focus on one aspect of the problem at a time.
There are reading assignments in Zybooks, but
the two chapters from the Java Learning Kit – Chapter 5 – and
Chapter 6 are your best source for learning this material. They
cover the things you need to learn to complete this project and
have good sample programs.
Your tasks are to:
Read Zybooks Assginment 11 - Arrays in Java.
Read the material in JLK Chapter 6 about arrays in Java.
Complete the Java Arrays Programming assignment.
Read the material in Chapter 6 about text files in Java.
There is no corresponding Zybooks assignment.
Complete the Java Text Files Programming assignment.
Read the Zybooks Assignment 12 - Methods in Java
Read the material in JLK Chapter 5 about methods in Java.
Complete the Java Methods programming assignment.
It may seem like their is a lot to do here but the assignments are
each simple and build on one another.
assignments:
#1
You should complete
Zybooks Assignment 11 - Arrays in Java
and read lessons
6.1, 6.2, and 6.3 in JLK Chapter 6
about arrays in Java before starting this assignment.
Your task is to create a Java I-P-O program that works with a
small array of data containing five test scores.
Your program should:
contain a for loop to read five test score into an array from the
user. The array should be a floating point array with five
elements.
Using second for loop, calculate the average score, highest
score, and lowest score in the array. JLK lesson 6.3 is a good
guide for doing this.
print the results.
You should submit a zipped copy of your IntelliJ project folder.
#2
You should read lesson
6.5 Text File Input and Output in Java
before starting this assignment. Reading Lab 6.6 will also be
helpful. There is no corresponding Zybooks assignment.
Your task is to modify the program from the
Java Arrays
programming assignment to use text files for input and output.
I suggest you save acopy of the original before modifying the
software.
Your modified program should:
contain a for loop to read the five test score into the array from
a text data file.
You will need to create and save a data file for the program to
use. It should have one test score on each line of the file. You
can type and save the text file with any text editor, such as
Notepad or Notepad++. NotePad++ is a good program to have
on your computer, It can be downloaded freely from:
https://notepad-plus-plus.org
(Links to an external site.)
It should be saved or copied to the same folder as your Java
source code file within you Intellij project.
Contain a second for loop, calculate the average score, highest
score, and lowest score in the array. This part of your program
does not need to change from the previous assignment.
output the results to a new text file. You can decide the name of
the file. You should only use a local file name and the file will
then be created in your IntelliJ project folder.
You should submit a zipped copy of your IntelliJ project folder,
which should contain the two data files within the project..
Previous
Next
#3
You should complete
Zybooks Assignment 12 - Methods in Java
and read lessons
JLK Chapter 5 - Methods and Modularity in Java
before starting this assignment.
Your task is to modify the program from the
Java
Text files programming assignment to contain several methods
for different parts of the program.I suggest you save a copy of
the original before modifying the software.
Your modified program should have the following six methods:
a method with a for loop to read the five test score into the
array from a text data file. The array should be declared in the
main method and passed as a parameter to this method.
three separate methods to each calculate and return one of the
following: the average score, highest score, and lowest score .
Each method should contain a for loop to calculate and return
one of the values to the main method. You can copy and edit he
existing loop form the previous program for each of these
methods.
a method to output the results to a new text file, as the main
method did in the previous program. You basically need to
move the code to do this into a new method.
the main method, which has the necessary variables and which
calls the other methods as needed, passing values to those
methods and receiving returned value from the methods as
needed.
Unlike Python functions, methods do not need to appear before
they are called in a program file. In fact, it is common practice
in Java to put the main() method as the first method in Java
program, similar to what is done in the payMethods sample
program in the chapter.
You should submit a zipped copy of your IntelliJ project folder,
which should contain will contain the two data files within the
project..
You should submit a zipped copy of your IntelliJ project folder.
Previous
Next

Más contenido relacionado

Similar a Description Unit 9 - Java Arrays and Data FilesThis unit is.docx

Strayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade newStrayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade newshyaminfo40
 
66781291 java-lab-manual
66781291 java-lab-manual66781291 java-lab-manual
66781291 java-lab-manualLaura Popovici
 
Computer Tools for Academic Research
Computer Tools for Academic ResearchComputer Tools for Academic Research
Computer Tools for Academic ResearchMiklos Koren
 
Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com  Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com amaranthbeg148
 
9781111530532 ppt ch07
9781111530532 ppt ch079781111530532 ppt ch07
9781111530532 ppt ch07Terry Yoast
 
9781111530532 ppt ch07
9781111530532 ppt ch079781111530532 ppt ch07
9781111530532 ppt ch07Terry Yoast
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingHamad Odhabi
 
CIS 406 Imagine Your Future/newtonhelp.com   
CIS 406 Imagine Your Future/newtonhelp.com   CIS 406 Imagine Your Future/newtonhelp.com   
CIS 406 Imagine Your Future/newtonhelp.com   bellflower47
 
CIS 406 Focus Dreams/newtonhelp.com
CIS 406 Focus Dreams/newtonhelp.comCIS 406 Focus Dreams/newtonhelp.com
CIS 406 Focus Dreams/newtonhelp.combellflower87
 
CIS 406 Life of the Mind/newtonhelp.com   
CIS 406 Life of the Mind/newtonhelp.com   CIS 406 Life of the Mind/newtonhelp.com   
CIS 406 Life of the Mind/newtonhelp.com   bellflower5
 
CIS 406 Inspiring Innovation/tutorialrank.com
 CIS 406 Inspiring Innovation/tutorialrank.com CIS 406 Inspiring Innovation/tutorialrank.com
CIS 406 Inspiring Innovation/tutorialrank.comjonhson112
 
Cis 406 Technology levels--snaptutorial.com
Cis 406 Technology levels--snaptutorial.comCis 406 Technology levels--snaptutorial.com
Cis 406 Technology levels--snaptutorial.comsholingarjosh58
 
Cis 406 Success Begins / snaptutorial.com
Cis 406 Success Begins / snaptutorial.comCis 406 Success Begins / snaptutorial.com
Cis 406 Success Begins / snaptutorial.comRobinson071
 
Cis 406 Enthusiastic Study - snaptutorial.com
Cis 406 Enthusiastic Study - snaptutorial.comCis 406 Enthusiastic Study - snaptutorial.com
Cis 406 Enthusiastic Study - snaptutorial.comStephenson01
 
CIS 406 Effective Communication - tutorialrank.com
CIS 406 Effective Communication - tutorialrank.comCIS 406 Effective Communication - tutorialrank.com
CIS 406 Effective Communication - tutorialrank.comBartholomew21
 

Similar a Description Unit 9 - Java Arrays and Data FilesThis unit is.docx (20)

Strayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade newStrayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade new
 
66781291 java-lab-manual
66781291 java-lab-manual66781291 java-lab-manual
66781291 java-lab-manual
 
Computer Tools for Academic Research
Computer Tools for Academic ResearchComputer Tools for Academic Research
Computer Tools for Academic Research
 
Class 1
Class 1Class 1
Class 1
 
Class 1
Class 1Class 1
Class 1
 
Class 1 blog
Class 1 blogClass 1 blog
Class 1 blog
 
Prg421
Prg421Prg421
Prg421
 
Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com  Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com
 
9781111530532 ppt ch07
9781111530532 ppt ch079781111530532 ppt ch07
9781111530532 ppt ch07
 
9781111530532 ppt ch07
9781111530532 ppt ch079781111530532 ppt ch07
9781111530532 ppt ch07
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
CIS 406 Imagine Your Future/newtonhelp.com   
CIS 406 Imagine Your Future/newtonhelp.com   CIS 406 Imagine Your Future/newtonhelp.com   
CIS 406 Imagine Your Future/newtonhelp.com   
 
CIS 406 Focus Dreams/newtonhelp.com
CIS 406 Focus Dreams/newtonhelp.comCIS 406 Focus Dreams/newtonhelp.com
CIS 406 Focus Dreams/newtonhelp.com
 
CIS 406 Life of the Mind/newtonhelp.com   
CIS 406 Life of the Mind/newtonhelp.com   CIS 406 Life of the Mind/newtonhelp.com   
CIS 406 Life of the Mind/newtonhelp.com   
 
CIS 406 Inspiring Innovation/tutorialrank.com
 CIS 406 Inspiring Innovation/tutorialrank.com CIS 406 Inspiring Innovation/tutorialrank.com
CIS 406 Inspiring Innovation/tutorialrank.com
 
Cis 406 Technology levels--snaptutorial.com
Cis 406 Technology levels--snaptutorial.comCis 406 Technology levels--snaptutorial.com
Cis 406 Technology levels--snaptutorial.com
 
Cis 406 Success Begins / snaptutorial.com
Cis 406 Success Begins / snaptutorial.comCis 406 Success Begins / snaptutorial.com
Cis 406 Success Begins / snaptutorial.com
 
Cis 406 Enthusiastic Study - snaptutorial.com
Cis 406 Enthusiastic Study - snaptutorial.comCis 406 Enthusiastic Study - snaptutorial.com
Cis 406 Enthusiastic Study - snaptutorial.com
 
CIS 406 Effective Communication - tutorialrank.com
CIS 406 Effective Communication - tutorialrank.comCIS 406 Effective Communication - tutorialrank.com
CIS 406 Effective Communication - tutorialrank.com
 
Prg421 prg 421
Prg421 prg 421Prg421 prg 421
Prg421 prg 421
 

Más de donaldp2

DescriptionRefer to this resource when completing the Its All .docx
DescriptionRefer to this resource when completing the Its All .docxDescriptionRefer to this resource when completing the Its All .docx
DescriptionRefer to this resource when completing the Its All .docxdonaldp2
 
DescriptionPresentation Assignment – Revised (November 16, 2.docx
DescriptionPresentation Assignment – Revised (November 16, 2.docxDescriptionPresentation Assignment – Revised (November 16, 2.docx
DescriptionPresentation Assignment – Revised (November 16, 2.docxdonaldp2
 
DescriptionInfographics represent information in a visual m.docx
DescriptionInfographics represent information in a visual m.docxDescriptionInfographics represent information in a visual m.docx
DescriptionInfographics represent information in a visual m.docxdonaldp2
 
DescriptionIn this activity, you will analyze and study the subj.docx
DescriptionIn this activity, you will analyze and study the subj.docxDescriptionIn this activity, you will analyze and study the subj.docx
DescriptionIn this activity, you will analyze and study the subj.docxdonaldp2
 
DescriptionImplement a basic Calculator using an Arduino, pus.docx
DescriptionImplement a basic Calculator using an Arduino, pus.docxDescriptionImplement a basic Calculator using an Arduino, pus.docx
DescriptionImplement a basic Calculator using an Arduino, pus.docxdonaldp2
 
DescriptionFor this assignment, students will choose something .docx
DescriptionFor this assignment, students will choose something .docxDescriptionFor this assignment, students will choose something .docx
DescriptionFor this assignment, students will choose something .docxdonaldp2
 
DescriptionDefend your choice of topic in 500 words or more..docx
DescriptionDefend your choice of topic in 500 words or more..docxDescriptionDefend your choice of topic in 500 words or more..docx
DescriptionDefend your choice of topic in 500 words or more..docxdonaldp2
 
DescriptionDebate  on a wide variety of issues in the United.docx
DescriptionDebate  on a wide variety of issues in the United.docxDescriptionDebate  on a wide variety of issues in the United.docx
DescriptionDebate  on a wide variety of issues in the United.docxdonaldp2
 
DescriptionAlpha is the best platform for entertainment to tel.docx
DescriptionAlpha is the best platform for entertainment to tel.docxDescriptionAlpha is the best platform for entertainment to tel.docx
DescriptionAlpha is the best platform for entertainment to tel.docxdonaldp2
 
DescriptionAnalyze  the parody of the show. The message bein.docx
DescriptionAnalyze  the parody of the show. The message bein.docxDescriptionAnalyze  the parody of the show. The message bein.docx
DescriptionAnalyze  the parody of the show. The message bein.docxdonaldp2
 
DESCRIPTION530 UNIT 4 QUESTION 3 Examine how knowledge of a.docx
DESCRIPTION530 UNIT 4 QUESTION 3 Examine how knowledge of a.docxDESCRIPTION530 UNIT 4 QUESTION 3 Examine how knowledge of a.docx
DESCRIPTION530 UNIT 4 QUESTION 3 Examine how knowledge of a.docxdonaldp2
 
Description Watch President Ronald Reagan’s 1983 speech to the Na.docx
Description Watch President Ronald Reagan’s 1983 speech to the Na.docxDescription Watch President Ronald Reagan’s 1983 speech to the Na.docx
Description Watch President Ronald Reagan’s 1983 speech to the Na.docxdonaldp2
 
Description Total Possible Score 30.00Distinguished .docx
Description Total Possible Score 30.00Distinguished .docxDescription Total Possible Score 30.00Distinguished .docx
Description Total Possible Score 30.00Distinguished .docxdonaldp2
 
Description Total Possible Score 16.00Distinguished .docx
Description Total Possible Score 16.00Distinguished .docxDescription Total Possible Score 16.00Distinguished .docx
Description Total Possible Score 16.00Distinguished .docxdonaldp2
 
Description The scenario description and requirements for Short.docx
Description The scenario description and requirements for Short.docxDescription The scenario description and requirements for Short.docx
Description The scenario description and requirements for Short.docxdonaldp2
 
Description Research the internet for an example of a violation.docx
Description Research the internet for an example of a violation.docxDescription Research the internet for an example of a violation.docx
Description Research the internet for an example of a violation.docxdonaldp2
 
Description Presentation (500 words + 10minutes)Percentage 40.docx
Description Presentation (500 words + 10minutes)Percentage 40.docxDescription Presentation (500 words + 10minutes)Percentage 40.docx
Description Presentation (500 words + 10minutes)Percentage 40.docxdonaldp2
 
Description of theNationalMilitary Strategy2018.docx
Description of theNationalMilitary Strategy2018.docxDescription of theNationalMilitary Strategy2018.docx
Description of theNationalMilitary Strategy2018.docxdonaldp2
 
Description of the toolUsages and meritsYour own demonstration.docx
Description of the toolUsages and meritsYour own demonstration.docxDescription of the toolUsages and meritsYour own demonstration.docx
Description of the toolUsages and meritsYour own demonstration.docxdonaldp2
 
Description of the AssignmentThe assignment provides an oppo.docx
Description of the AssignmentThe assignment provides an oppo.docxDescription of the AssignmentThe assignment provides an oppo.docx
Description of the AssignmentThe assignment provides an oppo.docxdonaldp2
 

Más de donaldp2 (20)

DescriptionRefer to this resource when completing the Its All .docx
DescriptionRefer to this resource when completing the Its All .docxDescriptionRefer to this resource when completing the Its All .docx
DescriptionRefer to this resource when completing the Its All .docx
 
DescriptionPresentation Assignment – Revised (November 16, 2.docx
DescriptionPresentation Assignment – Revised (November 16, 2.docxDescriptionPresentation Assignment – Revised (November 16, 2.docx
DescriptionPresentation Assignment – Revised (November 16, 2.docx
 
DescriptionInfographics represent information in a visual m.docx
DescriptionInfographics represent information in a visual m.docxDescriptionInfographics represent information in a visual m.docx
DescriptionInfographics represent information in a visual m.docx
 
DescriptionIn this activity, you will analyze and study the subj.docx
DescriptionIn this activity, you will analyze and study the subj.docxDescriptionIn this activity, you will analyze and study the subj.docx
DescriptionIn this activity, you will analyze and study the subj.docx
 
DescriptionImplement a basic Calculator using an Arduino, pus.docx
DescriptionImplement a basic Calculator using an Arduino, pus.docxDescriptionImplement a basic Calculator using an Arduino, pus.docx
DescriptionImplement a basic Calculator using an Arduino, pus.docx
 
DescriptionFor this assignment, students will choose something .docx
DescriptionFor this assignment, students will choose something .docxDescriptionFor this assignment, students will choose something .docx
DescriptionFor this assignment, students will choose something .docx
 
DescriptionDefend your choice of topic in 500 words or more..docx
DescriptionDefend your choice of topic in 500 words or more..docxDescriptionDefend your choice of topic in 500 words or more..docx
DescriptionDefend your choice of topic in 500 words or more..docx
 
DescriptionDebate  on a wide variety of issues in the United.docx
DescriptionDebate  on a wide variety of issues in the United.docxDescriptionDebate  on a wide variety of issues in the United.docx
DescriptionDebate  on a wide variety of issues in the United.docx
 
DescriptionAlpha is the best platform for entertainment to tel.docx
DescriptionAlpha is the best platform for entertainment to tel.docxDescriptionAlpha is the best platform for entertainment to tel.docx
DescriptionAlpha is the best platform for entertainment to tel.docx
 
DescriptionAnalyze  the parody of the show. The message bein.docx
DescriptionAnalyze  the parody of the show. The message bein.docxDescriptionAnalyze  the parody of the show. The message bein.docx
DescriptionAnalyze  the parody of the show. The message bein.docx
 
DESCRIPTION530 UNIT 4 QUESTION 3 Examine how knowledge of a.docx
DESCRIPTION530 UNIT 4 QUESTION 3 Examine how knowledge of a.docxDESCRIPTION530 UNIT 4 QUESTION 3 Examine how knowledge of a.docx
DESCRIPTION530 UNIT 4 QUESTION 3 Examine how knowledge of a.docx
 
Description Watch President Ronald Reagan’s 1983 speech to the Na.docx
Description Watch President Ronald Reagan’s 1983 speech to the Na.docxDescription Watch President Ronald Reagan’s 1983 speech to the Na.docx
Description Watch President Ronald Reagan’s 1983 speech to the Na.docx
 
Description Total Possible Score 30.00Distinguished .docx
Description Total Possible Score 30.00Distinguished .docxDescription Total Possible Score 30.00Distinguished .docx
Description Total Possible Score 30.00Distinguished .docx
 
Description Total Possible Score 16.00Distinguished .docx
Description Total Possible Score 16.00Distinguished .docxDescription Total Possible Score 16.00Distinguished .docx
Description Total Possible Score 16.00Distinguished .docx
 
Description The scenario description and requirements for Short.docx
Description The scenario description and requirements for Short.docxDescription The scenario description and requirements for Short.docx
Description The scenario description and requirements for Short.docx
 
Description Research the internet for an example of a violation.docx
Description Research the internet for an example of a violation.docxDescription Research the internet for an example of a violation.docx
Description Research the internet for an example of a violation.docx
 
Description Presentation (500 words + 10minutes)Percentage 40.docx
Description Presentation (500 words + 10minutes)Percentage 40.docxDescription Presentation (500 words + 10minutes)Percentage 40.docx
Description Presentation (500 words + 10minutes)Percentage 40.docx
 
Description of theNationalMilitary Strategy2018.docx
Description of theNationalMilitary Strategy2018.docxDescription of theNationalMilitary Strategy2018.docx
Description of theNationalMilitary Strategy2018.docx
 
Description of the toolUsages and meritsYour own demonstration.docx
Description of the toolUsages and meritsYour own demonstration.docxDescription of the toolUsages and meritsYour own demonstration.docx
Description of the toolUsages and meritsYour own demonstration.docx
 
Description of the AssignmentThe assignment provides an oppo.docx
Description of the AssignmentThe assignment provides an oppo.docxDescription of the AssignmentThe assignment provides an oppo.docx
Description of the AssignmentThe assignment provides an oppo.docx
 

Último

How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 

Último (20)

LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 

Description Unit 9 - Java Arrays and Data FilesThis unit is.docx

  • 1. Description: Unit 9 - Java Arrays and Data Files This unit is really about three different topics that are related to one another – arrays in Java, simple text files in Java, and modular programing in java (Java methods). The unit has a programming project spread over three related programming assignments, each worth 10 points. In the first assignment, you will create a Java program that works with a small array of data containing five test scores. It will get data from user input do some calculations, and then print the results. In the second assignment, you will modify a copy of the first assignment to load the data from a data file into an array, and then output the results to a data file. In the third assignment, you will decompose a copy of the second assignment into separate methods in Java. Our goal is to have a good modular program that loads stored data from a fie into an array, works with the data, then sends results to another data file. Doing this in three parts will allow you to focus on one aspect of the problem at a time. There are reading assignments in Zybooks, but the two chapters from the Java Learning Kit – Chapter 5 – and Chapter 6 are your best source for learning this material. They cover the things you need to learn to complete this project and have good sample programs. Your tasks are to:
  • 2. Read Zybooks Assginment 11 - Arrays in Java. Read the material in JLK Chapter 6 about arrays in Java. Complete the Java Arrays Programming assignment. Read the material in Chapter 6 about text files in Java. There is no corresponding Zybooks assignment. Complete the Java Text Files Programming assignment. Read the Zybooks Assignment 12 - Methods in Java Read the material in JLK Chapter 5 about methods in Java. Complete the Java Methods programming assignment. It may seem like their is a lot to do here but the assignments are each simple and build on one another. assignments: #1 You should complete Zybooks Assignment 11 - Arrays in Java and read lessons 6.1, 6.2, and 6.3 in JLK Chapter 6
  • 3. about arrays in Java before starting this assignment. Your task is to create a Java I-P-O program that works with a small array of data containing five test scores. Your program should: contain a for loop to read five test score into an array from the user. The array should be a floating point array with five elements. Using second for loop, calculate the average score, highest score, and lowest score in the array. JLK lesson 6.3 is a good guide for doing this. print the results. You should submit a zipped copy of your IntelliJ project folder. #2 You should read lesson 6.5 Text File Input and Output in Java before starting this assignment. Reading Lab 6.6 will also be helpful. There is no corresponding Zybooks assignment. Your task is to modify the program from the Java Arrays programming assignment to use text files for input and output. I suggest you save acopy of the original before modifying the software.
  • 4. Your modified program should: contain a for loop to read the five test score into the array from a text data file. You will need to create and save a data file for the program to use. It should have one test score on each line of the file. You can type and save the text file with any text editor, such as Notepad or Notepad++. NotePad++ is a good program to have on your computer, It can be downloaded freely from: https://notepad-plus-plus.org (Links to an external site.) It should be saved or copied to the same folder as your Java source code file within you Intellij project. Contain a second for loop, calculate the average score, highest score, and lowest score in the array. This part of your program does not need to change from the previous assignment. output the results to a new text file. You can decide the name of the file. You should only use a local file name and the file will then be created in your IntelliJ project folder. You should submit a zipped copy of your IntelliJ project folder, which should contain the two data files within the project.. Previous Next
  • 5. #3 You should complete Zybooks Assignment 12 - Methods in Java and read lessons JLK Chapter 5 - Methods and Modularity in Java before starting this assignment. Your task is to modify the program from the Java Text files programming assignment to contain several methods for different parts of the program.I suggest you save a copy of the original before modifying the software. Your modified program should have the following six methods: a method with a for loop to read the five test score into the array from a text data file. The array should be declared in the main method and passed as a parameter to this method. three separate methods to each calculate and return one of the following: the average score, highest score, and lowest score . Each method should contain a for loop to calculate and return one of the values to the main method. You can copy and edit he existing loop form the previous program for each of these methods.
  • 6. a method to output the results to a new text file, as the main method did in the previous program. You basically need to move the code to do this into a new method. the main method, which has the necessary variables and which calls the other methods as needed, passing values to those methods and receiving returned value from the methods as needed. Unlike Python functions, methods do not need to appear before they are called in a program file. In fact, it is common practice in Java to put the main() method as the first method in Java program, similar to what is done in the payMethods sample program in the chapter. You should submit a zipped copy of your IntelliJ project folder, which should contain will contain the two data files within the project.. You should submit a zipped copy of your IntelliJ project folder. Previous Next