SlideShare a Scribd company logo
1 of 1
Download to read offline
Instructions:
Write a program that will read in 3 integers from a file named input.txt. Take the three numbers
and pass them to a method that will find the maximum value of the 3 numbers and return the
value back to main(). Then pass the 3 integers to a min method that will return the minimum
value back to main(). Finally print out "For the set (#, #, #) the maximum value is #, and # is the
minimum value." where # are the actual values for the set, the max, and the min. You are not
allowed to use any of the Math libraries (so no Math.max() and Math.min()).
Please note that methods must be used.
Input Type & Format
The input will come in the form of a file named input.txt The file will contain a set of 3 integers.
Output Examples:
If input.txt is "1 2 3" the output would be For the set (1, 2, 3) the maximum value is 3, and 1 is
the minimum value.
Acceptable imports:
java.util.Scanner
java.io.*
Again no use of the Math libraries

More Related Content

Similar to Instructions- Write a program that will read in 3 integers from a file.pdf

Given below is the completed code along with comments. Output of the.pdf
Given below is the completed code along with comments. Output of the.pdfGiven below is the completed code along with comments. Output of the.pdf
Given below is the completed code along with comments. Output of the.pdf
aparnacollection
 
Getting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdfGetting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdf
info309708
 
C programming session 05
C programming session 05C programming session 05
C programming session 05
Dushmanta Nath
 
Write a method called uniqueNumbers that takes an int array as param.pdf
Write a method called uniqueNumbers that takes an int array as param.pdfWrite a method called uniqueNumbers that takes an int array as param.pdf
Write a method called uniqueNumbers that takes an int array as param.pdf
fashioncollection2
 
Hey i have attached the required file for my assignment.and addi
Hey i have attached the required file for my assignment.and addiHey i have attached the required file for my assignment.and addi
Hey i have attached the required file for my assignment.and addi
sorayan5ywschuit
 
02 c++ Array Pointer
02 c++ Array Pointer02 c++ Array Pointer
02 c++ Array Pointer
Tareq Hasan
 

Similar to Instructions- Write a program that will read in 3 integers from a file.pdf (15)

cpphtp4_PPT_03.ppt
cpphtp4_PPT_03.pptcpphtp4_PPT_03.ppt
cpphtp4_PPT_03.ppt
 
Python - Data Collection
Python - Data CollectionPython - Data Collection
Python - Data Collection
 
python1.ppt
python1.pptpython1.ppt
python1.ppt
 
Array assignment
Array assignmentArray assignment
Array assignment
 
Given below is the completed code along with comments. Output of the.pdf
Given below is the completed code along with comments. Output of the.pdfGiven below is the completed code along with comments. Output of the.pdf
Given below is the completed code along with comments. Output of the.pdf
 
Cpphtp4 ppt 03
Cpphtp4 ppt 03Cpphtp4 ppt 03
Cpphtp4 ppt 03
 
Getting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdfGetting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdf
 
C programming session 05
C programming session 05C programming session 05
C programming session 05
 
Chap08
Chap08Chap08
Chap08
 
Write a method called uniqueNumbers that takes an int array as param.pdf
Write a method called uniqueNumbers that takes an int array as param.pdfWrite a method called uniqueNumbers that takes an int array as param.pdf
Write a method called uniqueNumbers that takes an int array as param.pdf
 
Hey i have attached the required file for my assignment.and addi
Hey i have attached the required file for my assignment.and addiHey i have attached the required file for my assignment.and addi
Hey i have attached the required file for my assignment.and addi
 
02 c++ Array Pointer
02 c++ Array Pointer02 c++ Array Pointer
02 c++ Array Pointer
 
Python cheat-sheet
Python cheat-sheetPython cheat-sheet
Python cheat-sheet
 
I am trying to create a python script and need a little help.Im tr.pdf
I am trying to create a python script and need a little help.Im tr.pdfI am trying to create a python script and need a little help.Im tr.pdf
I am trying to create a python script and need a little help.Im tr.pdf
 
FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.
FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.
FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.
 

More from ColinjSWDavidsonn

In Java- Input is from a file- The input is all doubles- You are to in.pdf
In Java- Input is from a file- The input is all doubles- You are to in.pdfIn Java- Input is from a file- The input is all doubles- You are to in.pdf
In Java- Input is from a file- The input is all doubles- You are to in.pdf
ColinjSWDavidsonn
 
It is a simple program that that parses a simple expression grammar- T.pdf
It is a simple program that that parses a simple expression grammar- T.pdfIt is a simple program that that parses a simple expression grammar- T.pdf
It is a simple program that that parses a simple expression grammar- T.pdf
ColinjSWDavidsonn
 

More from ColinjSWDavidsonn (20)

In Chapter 8 you were introduced to the water-soluble vitamins- includ.pdf
In Chapter 8 you were introduced to the water-soluble vitamins- includ.pdfIn Chapter 8 you were introduced to the water-soluble vitamins- includ.pdf
In Chapter 8 you were introduced to the water-soluble vitamins- includ.pdf
 
In February 2020- the Bureau of Labor Statistics calculated the unempl.pdf
In February 2020- the Bureau of Labor Statistics calculated the unempl.pdfIn February 2020- the Bureau of Labor Statistics calculated the unempl.pdf
In February 2020- the Bureau of Labor Statistics calculated the unempl.pdf
 
In relation to the results of the HEBP2 gene- what role does the heme.pdf
In relation to the results of the HEBP2 gene- what role does the heme.pdfIn relation to the results of the HEBP2 gene- what role does the heme.pdf
In relation to the results of the HEBP2 gene- what role does the heme.pdf
 
In Python- A palindrome is a word or a phrase that is the same when re.pdf
In Python- A palindrome is a word or a phrase that is the same when re.pdfIn Python- A palindrome is a word or a phrase that is the same when re.pdf
In Python- A palindrome is a word or a phrase that is the same when re.pdf
 
In July of 2015 Dr- Ronald Ware executed to United Capital Source a no.pdf
In July of 2015 Dr- Ronald Ware executed to United Capital Source a no.pdfIn July of 2015 Dr- Ronald Ware executed to United Capital Source a no.pdf
In July of 2015 Dr- Ronald Ware executed to United Capital Source a no.pdf
 
In Java- Input is from a file- The input is all doubles- You are to in.pdf
In Java- Input is from a file- The input is all doubles- You are to in.pdfIn Java- Input is from a file- The input is all doubles- You are to in.pdf
In Java- Input is from a file- The input is all doubles- You are to in.pdf
 
In Java- Get doubles from input file- Output the biggest import java-i.pdf
In Java- Get doubles from input file- Output the biggest import java-i.pdfIn Java- Get doubles from input file- Output the biggest import java-i.pdf
In Java- Get doubles from input file- Output the biggest import java-i.pdf
 
IN java A chessboard has alternating black and white squares- The firs.pdf
IN java A chessboard has alternating black and white squares- The firs.pdfIN java A chessboard has alternating black and white squares- The firs.pdf
IN java A chessboard has alternating black and white squares- The firs.pdf
 
In a particular hospital- 6 newborn babies were delivered yesterday- H.pdf
In a particular hospital- 6 newborn babies were delivered yesterday- H.pdfIn a particular hospital- 6 newborn babies were delivered yesterday- H.pdf
In a particular hospital- 6 newborn babies were delivered yesterday- H.pdf
 
In Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdf
In Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdfIn Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdf
In Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdf
 
In Chapter 12- you learned about the distribution and marketing channe.pdf
In Chapter 12- you learned about the distribution and marketing channe.pdfIn Chapter 12- you learned about the distribution and marketing channe.pdf
In Chapter 12- you learned about the distribution and marketing channe.pdf
 
In detail- please discuss the technical structure of the Customs Tarif.pdf
In detail- please discuss the technical structure of the Customs Tarif.pdfIn detail- please discuss the technical structure of the Customs Tarif.pdf
In detail- please discuss the technical structure of the Customs Tarif.pdf
 
In an experiment of rolling a die twce Lel x be random variable to be.pdf
In an experiment of rolling a die twce Lel x be random variable to be.pdfIn an experiment of rolling a die twce Lel x be random variable to be.pdf
In an experiment of rolling a die twce Lel x be random variable to be.pdf
 
In a school- 16- of the students have seen a school counselor about an.pdf
In a school- 16- of the students have seen a school counselor about an.pdfIn a school- 16- of the students have seen a school counselor about an.pdf
In a school- 16- of the students have seen a school counselor about an.pdf
 
In a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdf
In a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdfIn a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdf
In a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdf
 
It is a simple program that that parses a simple expression grammar- T.pdf
It is a simple program that that parses a simple expression grammar- T.pdfIt is a simple program that that parses a simple expression grammar- T.pdf
It is a simple program that that parses a simple expression grammar- T.pdf
 
it ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdf
it ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdfit ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdf
it ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdf
 
Is this x-lined dominant or recessive inheritance- Write all possible.pdf
Is this x-lined dominant or recessive inheritance- Write all possible.pdfIs this x-lined dominant or recessive inheritance- Write all possible.pdf
Is this x-lined dominant or recessive inheritance- Write all possible.pdf
 
Is the study experimental- observational- or niether- 7) A political p.pdf
Is the study experimental- observational- or niether- 7) A political p.pdfIs the study experimental- observational- or niether- 7) A political p.pdf
Is the study experimental- observational- or niether- 7) A political p.pdf
 
Is Ethnicity a Foreign Concept-.pdf
Is Ethnicity a Foreign Concept-.pdfIs Ethnicity a Foreign Concept-.pdf
Is Ethnicity a Foreign Concept-.pdf
 

Recently uploaded

Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

Instructions- Write a program that will read in 3 integers from a file.pdf

  • 1. Instructions: Write a program that will read in 3 integers from a file named input.txt. Take the three numbers and pass them to a method that will find the maximum value of the 3 numbers and return the value back to main(). Then pass the 3 integers to a min method that will return the minimum value back to main(). Finally print out "For the set (#, #, #) the maximum value is #, and # is the minimum value." where # are the actual values for the set, the max, and the min. You are not allowed to use any of the Math libraries (so no Math.max() and Math.min()). Please note that methods must be used. Input Type & Format The input will come in the form of a file named input.txt The file will contain a set of 3 integers. Output Examples: If input.txt is "1 2 3" the output would be For the set (1, 2, 3) the maximum value is 3, and 1 is the minimum value. Acceptable imports: java.util.Scanner java.io.* Again no use of the Math libraries