Own file to test your program

Assignment Help JAVA Programming
Reference no: EM13164409

Write a program which reads a file and creates a file with the same contents of all lower case letters. Keep in mind that other characters are not affected.
Create your own file to test your program. Your job is to set up the input and output files to have the program read from a file and write to a file. Here is a basic program that will accomplish what is desired:

import java.io.*;
class InputOutput
{
public static void main(String args[])throws Exception
{
FileReader fr = new FileReader("Exercise03.in");
FileWriter fw = new FileWriter("Exercise03.out");

Answer6

int ch;
ch = fr.read();
while(ch != -1)
{
if((char)ch>='A' && (char)ch<='Z')ch = ch +('a'-'A');
fw.write((char)ch);
ch = fr.read();
}
fr.close();
fw.close();
}
}

Reference no: EM13164409

Questions Cloud

What is the partial pressure of oxygen : A gaseous mixture of O2 and N2 contains 30.8 nitrogen by mass. What is the partial pressure of oxygen in the mixture if the total pressure is 805 mmHg ?
State deficiency of phosphoglyceromutase : Deficiency of phosphoglyceromutase d) mutation that interferes with the formation of quarternary structure in hemoglobin
What is the molarity of the saturated solution : the solubility of O2(g) in water is 4.43 mg O2/100 g H20 at 20 degree Celsius when the gas pressure is maintained at 1 atm. What is the molarity of the saturated solution?
Rank following quantities in order of decreasing distance : Rank from longest to shortest distance. To rank the items as equivalent, overlap them.
Own file to test your program : Create your own file to test your program. Your job is to set up the input and output files to have the program read from a file and write to a file. Here is a basic program that will accomplish what is desired
State what concentration of substrate will give a velocity : what concentration of substrate will give a velocity (v) of 62% of maximal velocity (Vmax)?
Why it is desirable for corporations : Using a standard format memo please discuss the why it is desirable for corporations, charities, and NGOs to change their External Audit firms every 7-10 years.
The warehouses the firm supplies retail outlets : DSS Inc. is an electronics company with production facilities located in Atlanta, Boston, and Chicago. Components produced at these facilities may be shipped to the firm's regional warehouses that are located in Edison and Fargo. From the warehouses ..
What was the final volume of water on the buret : A volume of water was delivered using a buret and experimentally determined to have a mass of 2.00-g. What was the final volume of water on the buret if the inital was 0.44-mL? [assume the density of water is 1.00g/mL]

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program called word guessing game.

Write a program called Word Guessing Game. Open the file FourLetterWords.txt and write the contents into an array of Strings (the file has 87 words in it).

  Method named isallvowels that returns

Write a method named isAllVowels that returns whether a String consists entirely of vowels (a, e, i, o, or u, case-insensitively). If every character of the String is a vowel, your method should return true. If any character of the String is a non-vo..

  Write java program to select pine for furniture company

Write down the Java program for the furniture company. Ask user to select P for Pine, O for Oak or M for Mahogany.

  Develop class which implements interface

Let the ADT called SquareMatrix. (The matrix can be represented by 2-D array of ints w/ n rows and n columns.) Write specification for ADT as Java interface. Develop the class which implements interface.

  Can linear search algorithm be encoded using recursion

Determine the average amount of time people spend waiting for tables and provide examples from the "real world" of unsorted lists, sorted lists, indexed lists, lists that permit duplicate elements, and lists that do not permit duplicate elements

  Solving programming problems

Write a computer program that will figure out the total of an order when given the amount of the order ($1000) and a sales tax rate of eight percent.

  Create a class safestack that implements a stack of strings

Create a class SafeStack that implements a stack of strings

  Write java program prints strings given at command line

Write down the program Average.java which just prints strings which it is given at command line, one per line. If nothing is given at command line, print "No arguments".

  Write java program to store employee id number

Use employee data file called employees.txt should comprise at least 5 employee records. Each record stores employee ID number (six digits) last name, first name, middle inital,gender(m or f).

  Create and code a program uses three parallel numeric array

Create and code a program that uses three parallel numeric arrays of size 6. The program searches one of the arrays and then displays the corresponding values from the other two arrays. The program should prompt the user to enter a ProductID. Valid P..

  Recognize one high severity vulnerability for computer

Recognize one high severity vulnerability for each computer (if there is one). Explain vulnerability and describe control(s) to minimize risk from vulnerability.

  Programming exercises

Programming Exercises 1. Write an application named BadSubscriptCaught in which you declare an array of 10 first names. Write a try block in which you prompt the user for an integer and display the name in the requested position.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd