Chat with us, powered by LiveChat PRG421 UOPX Week Two Coding Assignment | WriteMoh

PRG421 UOPX Week Two Coding Assignment

Question Description


  • "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.

* Program: Week 2 Code Assignment
* Purpose: Console/file input and output
* Programmer: YOUR NAME HERE
* Class: PRG/421r13, Java Programming II
* 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(;
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.

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Do you need an answer to this or any other questions?

Have an assignment?

We are here to help you

Why we are the best

  •  High quality services
  •  On time delivery
  •  Professional writers
  •  Plagiarism free essays
  •  24/7 Customer Support
  • Satisfaction guarantee

Secure Payments