SlideShare a Scribd company logo
Assignment 2
Assignment Content
1.
Top of Form
Resource:
· "Console/File Input and Output" text file
For this assignment, you will build on "starter" code to create a
Java™ program that prompts the user for input, accepts user
input, and produces both console and file output.
Copy the linked code to a JAVA file.
Add Java® code based on the comments inside the code.
Note: Refer to this week's Individual "Week Two Analyze
Assignment" for model code you can adapt to meet this
assignment's requirements.
Test, debug, and run your code using the NetBeans editor to
make sure it meets the program requirements.
Save your JAVA file with a .txt extension.
* Program: Week 2 Code Assignment
* Purpose: Console/file input and output
* Programmer: YOUR NAME HERE
* Class: PRG/421r13, Java Programming II
* Instructor: YOUR INSTRUCTOR HERE
* Creation Date: TODAY'S DATE
* Comments: Fill in code
*
*****************************************************
******************/
package demo;
import java.util.Scanner; // scanner is a predefined class
for taking inputs from user
public class Startercode
{
public static void main(String[] args)
{
// prompts and accepts user input
Scanner input= new Scanner(System.in);
double data;
System.out.println("Enter value ");
// accepts file input
String fileName = "input.txt"; // name of the
file to open
String line = null; // will reference one
line at a time
try {
FileReader fileReader = // FileReader
reads text file
new FileReader(fileName); // reads in
data from the file
// produces both console and file output
try { // coding block to output
data to file
fileStdout = new PrintStream(new
FileOutputStream("data.txt")); // output file name is data.txt
System.out.println("=============="); // output
to console, numbers 0 through 9
fileStdout.println("" + i);
// ENTER YOUR CODE HERE. Enter code to end program
successfully. Bottom of Form
Assignment 3
Assignment Content
1.
Top of Form
For this assignment, you will develop "starter" code. After you
finish, your code should access an existing text file that you
have created, create an input stream, read the contents of the
text flie, sort and store the contents of the text file into an
ArrayList, then write the sorted contents via an ouput stream to
a separate output text file.
Copy and paste the following Java™ code into a JAVA source
file in NetBeans:
import java.io.BufferedReader;
import java.io.BufferedWriter;
public class Datasort {
public static void main (String [] args) {
File fin = // input file
File fout = // create an out file
// Java FileInputStream class obtains input bytes from a file
FileInputStream fis = new FileInputStream(fin);
// buffering characters so as to provide for the efficient reading
of characters, arrays, and lines
BufferedReader in = new BufferedReader(new
InputStreamReader(fis));
// declare an array in-line, ready for the sort
String aLine;
ArrayList<String> al = new ArrayList<String> ();
int i = 0;
while ((aLine = in.readLine()) != null) {
// set the sort for values is greater than 0
Collections.sort(al); // sorted content to the output file
{
System.out.println(s);
}
// close the 2 files
}
}
Add code as indicated in the comments.
Note: Refer to this week's Individual assignment, "Week Three
Analyze Assignment," and to Ch. 8, "IO," in OCP:
Oracle® Certified Professional Java® SE 8 Programmer II
Study Guide.
Run and debug your modified program in NetBeans until it
satisfies the requirements described above.
Save your finalized JAVA file with a .txt extension
Week 3 analysis assignment referred to
/****************************************************
******************
* Program: Datasort
* Purpose: Java code that sorts, extracts data and saves it to
a collection
* Programmer: I am student
* Class: PRG/421r13, Java Programming II
* Instructor:
* Creation Date: 12/01/2017
*
* Comments:
* Extracts data from a file, sorts it, displays it onscreen, and
saves it.
*
*****************************************************
******************/
// import the needed classes
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
public class Datasort {
public static void main (String [] args) throws IOException {
File fin = new File("e:input.txt"); // input file on e: drive
(with data)
File fout = new File("e:sorted.txt"); // create an out file on
e: drive
// Java FileInputStream class obtains input bytes from a file
FileInputStream fis = new FileInputStream(fin);
FileOutputStream fos = new FileOutputStream(fout);
// buffering characters so as to provide for the efficient reading
of characters, arrays, and lines
BufferedReader in = new BufferedReader(new
InputStreamReader(fis));
BufferedWriter out = new BufferedWriter(new
OutputStreamWriter(fos));
// declare an array in-line, ready for the sort
String aLine;
FLORIDA NATIONAL UNIVERSITY
RN-BSN PROGRAM
NURSING DEPARTMENT
NUR4636 – COMMUNITY HEALTH NURSING
COMMUNITY HEALTH ASSESSMENT/WINSHIELD
SURVEY
PROF. EDDIE CRUZ, RN MSN
GUIDELINES:
1. Community description.
2. Community health status (can be obtain from the department
of health).
3. The role of the community as a client.
4. Healthy people 2020, lading health indictors in your
community.
5. Conclusion.
Also, you must present a table as an appendix with the
following topics and description;
Housing
Transportation
Race and ethnicity
Open space
Service centers
Religion and politics
You are going to follow the posting instructions in the syllabus.
The assignment will be posted in both the discussion tab of the
blackboard by September 15, 2019 @ 11:59 and then I will open
for you to review your peers and post two replies about their
assessment.
This assignment has a total of 100 points. I will be monitoring
plagiarism very closely.
If you have any question you can contact me via FNU email.

More Related Content

Similar to Assignment 2Assignment Content1. Top of FormResource·.docx

1.introduction to java
1.introduction to java1.introduction to java
1.introduction to java
Madhura Bhalerao
 
Input output files in java
Input output files in javaInput output files in java
Input output files in java
Kavitha713564
 
FileWrite.javaFileWrite.java  To change this license header.docx
FileWrite.javaFileWrite.java  To change this license header.docxFileWrite.javaFileWrite.java  To change this license header.docx
FileWrite.javaFileWrite.java  To change this license header.docx
ssuser454af01
 
Writing documentation with Asciidoctor
Writing documentation  with  AsciidoctorWriting documentation  with  Asciidoctor
Writing documentation with Asciidoctor
Jérémie Bresson
 
Unit No 5 Files and Database Connectivity.pptx
Unit No 5 Files and Database Connectivity.pptxUnit No 5 Files and Database Connectivity.pptx
Unit No 5 Files and Database Connectivity.pptx
DrYogeshDeshmukh1
 
Core java introduction
Core java introduction Core java introduction
Core java introduction
Som Prakash Rai
 
Week 4 Individual Assignmentbuild.xml Builds, tests, a.docx
Week 4 Individual Assignmentbuild.xml      Builds, tests, a.docxWeek 4 Individual Assignmentbuild.xml      Builds, tests, a.docx
Week 4 Individual Assignmentbuild.xml Builds, tests, a.docx
melbruce90096
 
file-transfer-using-tcp.pdf
file-transfer-using-tcp.pdffile-transfer-using-tcp.pdf
file-transfer-using-tcp.pdf
Jayaprasanna4
 
Character stream classes introd .51
Character stream classes introd  .51Character stream classes introd  .51
Character stream classes introd .51myrajendra
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorial
Rohit Jagtap
 
Question IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docxQuestion IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docx
audeleypearl
 
React Basic and Advance || React Basic
React Basic and Advance   || React BasicReact Basic and Advance   || React Basic
React Basic and Advance || React Basic
rafaqathussainc077
 
College Project - Java Disassembler - Description
College Project - Java Disassembler - DescriptionCollege Project - Java Disassembler - Description
College Project - Java Disassembler - Description
Ganesh Samarthyam
 
Introduction to Node JS1.pdf
Introduction to Node JS1.pdfIntroduction to Node JS1.pdf
Introduction to Node JS1.pdf
Bareen Shaikh
 
Hi, I need help with a java programming project. specifically practi.pdf
Hi, I need help with a java programming project. specifically practi.pdfHi, I need help with a java programming project. specifically practi.pdf
Hi, I need help with a java programming project. specifically practi.pdf
PRATIKSINHA7304
 
Java Deserialization Vulnerabilities - The Forgotten Bug Class
Java Deserialization Vulnerabilities - The Forgotten Bug ClassJava Deserialization Vulnerabilities - The Forgotten Bug Class
Java Deserialization Vulnerabilities - The Forgotten Bug Class
CODE WHITE GmbH
 
B.Sc. III(VI Sem) Advance Java Unit2: Appet
B.Sc. III(VI Sem) Advance Java Unit2: AppetB.Sc. III(VI Sem) Advance Java Unit2: Appet
B.Sc. III(VI Sem) Advance Java Unit2: Appet
Assistant Professor, Shri Shivaji Science College, Amravati
 
1.26 File Input-Output in JAVA.pptx
1.26 File Input-Output in JAVA.pptx1.26 File Input-Output in JAVA.pptx
1.26 File Input-Output in JAVA.pptx
YashrajMohrir
 
java basic for begginers
java basic for begginersjava basic for begginers
java basic for begginers
divaskrgupta007
 

Similar to Assignment 2Assignment Content1. Top of FormResource·.docx (20)

1.introduction to java
1.introduction to java1.introduction to java
1.introduction to java
 
Input output files in java
Input output files in javaInput output files in java
Input output files in java
 
FileWrite.javaFileWrite.java  To change this license header.docx
FileWrite.javaFileWrite.java  To change this license header.docxFileWrite.javaFileWrite.java  To change this license header.docx
FileWrite.javaFileWrite.java  To change this license header.docx
 
Writing documentation with Asciidoctor
Writing documentation  with  AsciidoctorWriting documentation  with  Asciidoctor
Writing documentation with Asciidoctor
 
Unit No 5 Files and Database Connectivity.pptx
Unit No 5 Files and Database Connectivity.pptxUnit No 5 Files and Database Connectivity.pptx
Unit No 5 Files and Database Connectivity.pptx
 
Core java introduction
Core java introduction Core java introduction
Core java introduction
 
Week 4 Individual Assignmentbuild.xml Builds, tests, a.docx
Week 4 Individual Assignmentbuild.xml      Builds, tests, a.docxWeek 4 Individual Assignmentbuild.xml      Builds, tests, a.docx
Week 4 Individual Assignmentbuild.xml Builds, tests, a.docx
 
file-transfer-using-tcp.pdf
file-transfer-using-tcp.pdffile-transfer-using-tcp.pdf
file-transfer-using-tcp.pdf
 
Character stream classes introd .51
Character stream classes introd  .51Character stream classes introd  .51
Character stream classes introd .51
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorial
 
Question IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docxQuestion IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docx
 
React Basic and Advance || React Basic
React Basic and Advance   || React BasicReact Basic and Advance   || React Basic
React Basic and Advance || React Basic
 
College Project - Java Disassembler - Description
College Project - Java Disassembler - DescriptionCollege Project - Java Disassembler - Description
College Project - Java Disassembler - Description
 
Introduction to Node JS1.pdf
Introduction to Node JS1.pdfIntroduction to Node JS1.pdf
Introduction to Node JS1.pdf
 
Apache ant
Apache antApache ant
Apache ant
 
Hi, I need help with a java programming project. specifically practi.pdf
Hi, I need help with a java programming project. specifically practi.pdfHi, I need help with a java programming project. specifically practi.pdf
Hi, I need help with a java programming project. specifically practi.pdf
 
Java Deserialization Vulnerabilities - The Forgotten Bug Class
Java Deserialization Vulnerabilities - The Forgotten Bug ClassJava Deserialization Vulnerabilities - The Forgotten Bug Class
Java Deserialization Vulnerabilities - The Forgotten Bug Class
 
B.Sc. III(VI Sem) Advance Java Unit2: Appet
B.Sc. III(VI Sem) Advance Java Unit2: AppetB.Sc. III(VI Sem) Advance Java Unit2: Appet
B.Sc. III(VI Sem) Advance Java Unit2: Appet
 
1.26 File Input-Output in JAVA.pptx
1.26 File Input-Output in JAVA.pptx1.26 File Input-Output in JAVA.pptx
1.26 File Input-Output in JAVA.pptx
 
java basic for begginers
java basic for begginersjava basic for begginers
java basic for begginers
 

More from braycarissa250

1.Does BPH predispose this patient to cancer2. Why are pati.docx
1.Does BPH predispose this patient to cancer2. Why are pati.docx1.Does BPH predispose this patient to cancer2. Why are pati.docx
1.Does BPH predispose this patient to cancer2. Why are pati.docx
braycarissa250
 
1.Do you think that mass media mostly reflects musical taste, or.docx
1.Do you think that mass media mostly reflects musical taste, or.docx1.Do you think that mass media mostly reflects musical taste, or.docx
1.Do you think that mass media mostly reflects musical taste, or.docx
braycarissa250
 
1.Discuss theoretical and conceptual frameworks. How are the.docx
1.Discuss theoretical and conceptual frameworks. How are the.docx1.Discuss theoretical and conceptual frameworks. How are the.docx
1.Discuss theoretical and conceptual frameworks. How are the.docx
braycarissa250
 
1.Discuss the medical model of corrections. Is this model of c.docx
1.Discuss the medical model of corrections. Is this model of c.docx1.Discuss the medical model of corrections. Is this model of c.docx
1.Discuss the medical model of corrections. Is this model of c.docx
braycarissa250
 
1.Discussion Question How do we perceive sacred spaceplace in Ame.docx
1.Discussion Question How do we perceive sacred spaceplace in Ame.docx1.Discussion Question How do we perceive sacred spaceplace in Ame.docx
1.Discussion Question How do we perceive sacred spaceplace in Ame.docx
braycarissa250
 
1.Cybercriminals use many different types of malware to attack s.docx
1.Cybercriminals use many different types of malware to attack s.docx1.Cybercriminals use many different types of malware to attack s.docx
1.Cybercriminals use many different types of malware to attack s.docx
braycarissa250
 
1.Define emotional intelligence. What are the benefits of emotional .docx
1.Define emotional intelligence. What are the benefits of emotional .docx1.Define emotional intelligence. What are the benefits of emotional .docx
1.Define emotional intelligence. What are the benefits of emotional .docx
braycarissa250
 
1.Define Strategic Planning and Swot Analysis2.List and define.docx
1.Define Strategic Planning and Swot Analysis2.List and define.docx1.Define Strategic Planning and Swot Analysis2.List and define.docx
1.Define Strategic Planning and Swot Analysis2.List and define.docx
braycarissa250
 
1.Choose a writer; indicate hisher contribution to the Harlem Renai.docx
1.Choose a writer; indicate hisher contribution to the Harlem Renai.docx1.Choose a writer; indicate hisher contribution to the Harlem Renai.docx
1.Choose a writer; indicate hisher contribution to the Harlem Renai.docx
braycarissa250
 
1.Being sure that one has the resources necessary to accomplish the .docx
1.Being sure that one has the resources necessary to accomplish the .docx1.Being sure that one has the resources necessary to accomplish the .docx
1.Being sure that one has the resources necessary to accomplish the .docx
braycarissa250
 
1.Based on how you will evaluate your EBP project, which indepen.docx
1.Based on how you will evaluate your EBP project, which indepen.docx1.Based on how you will evaluate your EBP project, which indepen.docx
1.Based on how you will evaluate your EBP project, which indepen.docx
braycarissa250
 
1.Be organized. 2.   Spend less time doing a summary, but more o.docx
1.Be organized. 2.   Spend less time doing a summary, but more o.docx1.Be organized. 2.   Spend less time doing a summary, but more o.docx
1.Be organized. 2.   Spend less time doing a summary, but more o.docx
braycarissa250
 
1.After discussion with your preceptor, name one financial aspec.docx
1.After discussion with your preceptor, name one financial aspec.docx1.After discussion with your preceptor, name one financial aspec.docx
1.After discussion with your preceptor, name one financial aspec.docx
braycarissa250
 
1.A 52-year-old obese Caucasian male presents to the clinic wit.docx
1.A 52-year-old obese Caucasian male presents to the clinic wit.docx1.A 52-year-old obese Caucasian male presents to the clinic wit.docx
1.A 52-year-old obese Caucasian male presents to the clinic wit.docx
braycarissa250
 
1.1Arguments, Premises, and ConclusionsHow Logical Are You·.docx
1.1Arguments, Premises, and ConclusionsHow Logical Are You·.docx1.1Arguments, Premises, and ConclusionsHow Logical Are You·.docx
1.1Arguments, Premises, and ConclusionsHow Logical Are You·.docx
braycarissa250
 
1.4 Participate in health care policy development to influence nursi.docx
1.4 Participate in health care policy development to influence nursi.docx1.4 Participate in health care policy development to influence nursi.docx
1.4 Participate in health care policy development to influence nursi.docx
braycarissa250
 
1.5 - 2 pages single-spaced. Use 1-inch margins, 12 font, Microsoft .docx
1.5 - 2 pages single-spaced. Use 1-inch margins, 12 font, Microsoft .docx1.5 - 2 pages single-spaced. Use 1-inch margins, 12 font, Microsoft .docx
1.5 - 2 pages single-spaced. Use 1-inch margins, 12 font, Microsoft .docx
braycarissa250
 
1.5 Pages on the following topics Diversity, Race and Gender Equity.docx
1.5 Pages on the following topics Diversity, Race and Gender Equity.docx1.5 Pages on the following topics Diversity, Race and Gender Equity.docx
1.5 Pages on the following topics Diversity, Race and Gender Equity.docx
braycarissa250
 
1.0. Introduction Effective project management is consid.docx
1.0. Introduction Effective project management is consid.docx1.0. Introduction Effective project management is consid.docx
1.0. Introduction Effective project management is consid.docx
braycarissa250
 
1.1 What is the OSI security architecture1.2 What is the differ.docx
1.1 What is the OSI security architecture1.2 What is the differ.docx1.1 What is the OSI security architecture1.2 What is the differ.docx
1.1 What is the OSI security architecture1.2 What is the differ.docx
braycarissa250
 

More from braycarissa250 (20)

1.Does BPH predispose this patient to cancer2. Why are pati.docx
1.Does BPH predispose this patient to cancer2. Why are pati.docx1.Does BPH predispose this patient to cancer2. Why are pati.docx
1.Does BPH predispose this patient to cancer2. Why are pati.docx
 
1.Do you think that mass media mostly reflects musical taste, or.docx
1.Do you think that mass media mostly reflects musical taste, or.docx1.Do you think that mass media mostly reflects musical taste, or.docx
1.Do you think that mass media mostly reflects musical taste, or.docx
 
1.Discuss theoretical and conceptual frameworks. How are the.docx
1.Discuss theoretical and conceptual frameworks. How are the.docx1.Discuss theoretical and conceptual frameworks. How are the.docx
1.Discuss theoretical and conceptual frameworks. How are the.docx
 
1.Discuss the medical model of corrections. Is this model of c.docx
1.Discuss the medical model of corrections. Is this model of c.docx1.Discuss the medical model of corrections. Is this model of c.docx
1.Discuss the medical model of corrections. Is this model of c.docx
 
1.Discussion Question How do we perceive sacred spaceplace in Ame.docx
1.Discussion Question How do we perceive sacred spaceplace in Ame.docx1.Discussion Question How do we perceive sacred spaceplace in Ame.docx
1.Discussion Question How do we perceive sacred spaceplace in Ame.docx
 
1.Cybercriminals use many different types of malware to attack s.docx
1.Cybercriminals use many different types of malware to attack s.docx1.Cybercriminals use many different types of malware to attack s.docx
1.Cybercriminals use many different types of malware to attack s.docx
 
1.Define emotional intelligence. What are the benefits of emotional .docx
1.Define emotional intelligence. What are the benefits of emotional .docx1.Define emotional intelligence. What are the benefits of emotional .docx
1.Define emotional intelligence. What are the benefits of emotional .docx
 
1.Define Strategic Planning and Swot Analysis2.List and define.docx
1.Define Strategic Planning and Swot Analysis2.List and define.docx1.Define Strategic Planning and Swot Analysis2.List and define.docx
1.Define Strategic Planning and Swot Analysis2.List and define.docx
 
1.Choose a writer; indicate hisher contribution to the Harlem Renai.docx
1.Choose a writer; indicate hisher contribution to the Harlem Renai.docx1.Choose a writer; indicate hisher contribution to the Harlem Renai.docx
1.Choose a writer; indicate hisher contribution to the Harlem Renai.docx
 
1.Being sure that one has the resources necessary to accomplish the .docx
1.Being sure that one has the resources necessary to accomplish the .docx1.Being sure that one has the resources necessary to accomplish the .docx
1.Being sure that one has the resources necessary to accomplish the .docx
 
1.Based on how you will evaluate your EBP project, which indepen.docx
1.Based on how you will evaluate your EBP project, which indepen.docx1.Based on how you will evaluate your EBP project, which indepen.docx
1.Based on how you will evaluate your EBP project, which indepen.docx
 
1.Be organized. 2.   Spend less time doing a summary, but more o.docx
1.Be organized. 2.   Spend less time doing a summary, but more o.docx1.Be organized. 2.   Spend less time doing a summary, but more o.docx
1.Be organized. 2.   Spend less time doing a summary, but more o.docx
 
1.After discussion with your preceptor, name one financial aspec.docx
1.After discussion with your preceptor, name one financial aspec.docx1.After discussion with your preceptor, name one financial aspec.docx
1.After discussion with your preceptor, name one financial aspec.docx
 
1.A 52-year-old obese Caucasian male presents to the clinic wit.docx
1.A 52-year-old obese Caucasian male presents to the clinic wit.docx1.A 52-year-old obese Caucasian male presents to the clinic wit.docx
1.A 52-year-old obese Caucasian male presents to the clinic wit.docx
 
1.1Arguments, Premises, and ConclusionsHow Logical Are You·.docx
1.1Arguments, Premises, and ConclusionsHow Logical Are You·.docx1.1Arguments, Premises, and ConclusionsHow Logical Are You·.docx
1.1Arguments, Premises, and ConclusionsHow Logical Are You·.docx
 
1.4 Participate in health care policy development to influence nursi.docx
1.4 Participate in health care policy development to influence nursi.docx1.4 Participate in health care policy development to influence nursi.docx
1.4 Participate in health care policy development to influence nursi.docx
 
1.5 - 2 pages single-spaced. Use 1-inch margins, 12 font, Microsoft .docx
1.5 - 2 pages single-spaced. Use 1-inch margins, 12 font, Microsoft .docx1.5 - 2 pages single-spaced. Use 1-inch margins, 12 font, Microsoft .docx
1.5 - 2 pages single-spaced. Use 1-inch margins, 12 font, Microsoft .docx
 
1.5 Pages on the following topics Diversity, Race and Gender Equity.docx
1.5 Pages on the following topics Diversity, Race and Gender Equity.docx1.5 Pages on the following topics Diversity, Race and Gender Equity.docx
1.5 Pages on the following topics Diversity, Race and Gender Equity.docx
 
1.0. Introduction Effective project management is consid.docx
1.0. Introduction Effective project management is consid.docx1.0. Introduction Effective project management is consid.docx
1.0. Introduction Effective project management is consid.docx
 
1.1 What is the OSI security architecture1.2 What is the differ.docx
1.1 What is the OSI security architecture1.2 What is the differ.docx1.1 What is the OSI security architecture1.2 What is the differ.docx
1.1 What is the OSI security architecture1.2 What is the differ.docx
 

Recently uploaded

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 

Recently uploaded (20)

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 

Assignment 2Assignment Content1. Top of FormResource·.docx

  • 1. Assignment 2 Assignment Content 1. Top of Form Resource: · "Console/File Input and Output" text file For this assignment, you will build on "starter" code to create a Java™ program that prompts the user for input, accepts user input, and produces both console and file output. Copy the linked code to a JAVA file. Add Java® code based on the comments inside the code. Note: Refer to this week's Individual "Week Two Analyze Assignment" for model code you can adapt to meet this assignment's requirements. Test, debug, and run your code using the NetBeans editor to make sure it meets the program requirements. Save your JAVA file with a .txt extension. * Program: Week 2 Code Assignment * Purpose: Console/file input and output * Programmer: YOUR NAME HERE * Class: PRG/421r13, Java Programming II * Instructor: YOUR INSTRUCTOR HERE * Creation Date: TODAY'S DATE * Comments: Fill in code *
  • 2. ***************************************************** ******************/ package demo; import java.util.Scanner; // scanner is a predefined class for taking inputs from user public class Startercode { public static void main(String[] args) { // prompts and accepts user input Scanner input= new Scanner(System.in); double data; System.out.println("Enter value "); // accepts file input String fileName = "input.txt"; // name of the file to open String line = null; // will reference one line at a time try { FileReader fileReader = // FileReader reads text file new FileReader(fileName); // reads in data from the file // produces both console and file output try { // coding block to output data to file fileStdout = new PrintStream(new FileOutputStream("data.txt")); // output file name is data.txt System.out.println("=============="); // output to console, numbers 0 through 9
  • 3. fileStdout.println("" + i); // ENTER YOUR CODE HERE. Enter code to end program successfully. Bottom of Form Assignment 3 Assignment Content 1. Top of Form For this assignment, you will develop "starter" code. After you finish, your code should access an existing text file that you have created, create an input stream, read the contents of the text flie, sort and store the contents of the text file into an ArrayList, then write the sorted contents via an ouput stream to a separate output text file. Copy and paste the following Java™ code into a JAVA source file in NetBeans: import java.io.BufferedReader; import java.io.BufferedWriter; public class Datasort { public static void main (String [] args) { File fin = // input file File fout = // create an out file // Java FileInputStream class obtains input bytes from a file FileInputStream fis = new FileInputStream(fin); // buffering characters so as to provide for the efficient reading of characters, arrays, and lines BufferedReader in = new BufferedReader(new InputStreamReader(fis)); // declare an array in-line, ready for the sort String aLine; ArrayList<String> al = new ArrayList<String> ();
  • 4. int i = 0; while ((aLine = in.readLine()) != null) { // set the sort for values is greater than 0 Collections.sort(al); // sorted content to the output file { System.out.println(s); } // close the 2 files } } Add code as indicated in the comments. Note: Refer to this week's Individual assignment, "Week Three Analyze Assignment," and to Ch. 8, "IO," in OCP: Oracle® Certified Professional Java® SE 8 Programmer II Study Guide. Run and debug your modified program in NetBeans until it satisfies the requirements described above. Save your finalized JAVA file with a .txt extension Week 3 analysis assignment referred to /**************************************************** ****************** * Program: Datasort * Purpose: Java code that sorts, extracts data and saves it to a collection * Programmer: I am student * Class: PRG/421r13, Java Programming II * Instructor: * Creation Date: 12/01/2017 * * Comments:
  • 5. * Extracts data from a file, sorts it, displays it onscreen, and saves it. * ***************************************************** ******************/ // import the needed classes import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; public class Datasort { public static void main (String [] args) throws IOException { File fin = new File("e:input.txt"); // input file on e: drive (with data) File fout = new File("e:sorted.txt"); // create an out file on e: drive // Java FileInputStream class obtains input bytes from a file FileInputStream fis = new FileInputStream(fin); FileOutputStream fos = new FileOutputStream(fout); // buffering characters so as to provide for the efficient reading of characters, arrays, and lines
  • 6. BufferedReader in = new BufferedReader(new InputStreamReader(fis)); BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); // declare an array in-line, ready for the sort String aLine; FLORIDA NATIONAL UNIVERSITY RN-BSN PROGRAM NURSING DEPARTMENT NUR4636 – COMMUNITY HEALTH NURSING COMMUNITY HEALTH ASSESSMENT/WINSHIELD SURVEY PROF. EDDIE CRUZ, RN MSN GUIDELINES: 1. Community description. 2. Community health status (can be obtain from the department of health). 3. The role of the community as a client. 4. Healthy people 2020, lading health indictors in your community. 5. Conclusion. Also, you must present a table as an appendix with the following topics and description; Housing Transportation Race and ethnicity Open space Service centers Religion and politics
  • 7. You are going to follow the posting instructions in the syllabus. The assignment will be posted in both the discussion tab of the blackboard by September 15, 2019 @ 11:59 and then I will open for you to review your peers and post two replies about their assessment. This assignment has a total of 100 points. I will be monitoring plagiarism very closely. If you have any question you can contact me via FNU email.