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

  Java program to write-read data from user using i-o function

Write java program to write and read data from user using I/O functions. Describe class with data members name[20],emp_id,basic pay,net pay.calculate all the allowances.

  Create a java program to calculate the circumference

Create a Java program based on the geometric shapes. The program should begin by prompting you for the shape you want to calculate the circumference.

  Program should assign a seat in the first class

If a person enters 1, your program should assign a seat in the first class (rows 1 - 3). If a person enters 2, your program should assign a seat in business class (rows 4 - 7). If a person enters 3, your program should assign a seat in economy class ..

  Method to calculate all primes in the range [2..n]

One commonly used method to calculate all primes in the range [2..n] is to start with the number 2, mark it as prime, and mark all its multiples (excluding itself) as not prime. Then, we find the next smallest unmarked number, mark it as prime, and m..

  Write a version of sumpairs

Write a version of sumPairs  that sums each component of the pairs separately, returning a pair consisting of the sum of the first components and the sum of the second components. So basically [(3,1)(10,3)] would return (13,4).

  Sequence of method in vector class

Construct a Vector class implementing a number of vector operations as methods along with a testing program to verify the class is working.

  Write a program that asks the user to enter three names

Write a program that asks the user to enter three names

  Write a class that reads a file

In java, write a class that reads a file and outputs a list of the unique words in the file and the number of times each unique word occurs.Hint: use a HashMap with keys being the words and values being integer counts associated with the words.

  Bilinear and nearest neighbour algorithm in java

How to do bilinear and nearest neighbour algorithm in java. Show how to eliminate change in pixel aspect ratio in java.

  The williamsburg women''s club

The Williamsburg Women's Club offers scholarships to local high school students who meet any of several criteria. Write an application that prompts the user for a student's numeric high school grade point average (for example, 3.2), the student's num..

  Write function in javascript to compute person-s gross pay

Write the function using JavaScript syntax to compute a person's gross pay for a week. The function should receive the number of hours worked and the rate of pay per hour.

  Write program in java-calculate and display mortgage payment

Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage.

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