The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 337 Weeks Ago, 1 Day Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Need help with writing this question, and also need some help with writing comments on a few other files
W rite a Java program which reads a text file and writes the content into a new file. During the read-write process, convert all the upper case letters into lower case ones. In other words, your programming task is to c reate a new file with the same content of the original file, only that all the upper case letters are converted into lower case ones in the new file.
C reate your own text file to test your program. You willimport java.util.Scanner;
public class UseCourse {
public static void main(String[] args) {
public class LabCourse extends CollegeCourse {
CollegeCourse cc=new CollegeCourse();
int c=cc.getCredit();
public void display(){
super.display();
System.out.println("Lab fee is $50");
}
}
Scanner sc=new Scanner(System.in);
System.out.println("Enter the department");
String s=sc.next();
if(s.equalsIgnoreCase("BIO") || s.equalsIgnoreCase("PHY") ||s.equalsIgnoreCase("CHM") ||s.equalsIgnoreCase("CIS"))
{
System.out.println("Enter the Course Number");
int s1=sc.nextInt();
System.out.println("Enter the Credit");
int s2=sc.nextInt();
LabCourse lc=new LabCourse();
lc.setDepartment(s);
lc.setCourseNumber(s1);
lc.setCredit(s2);
lc.display();
}
else
{
System.out.println("Enter the Course Number");
int s1=sc.nextInt();
System.out.println("Enter the Credit");
int s2=sc.nextInt();
CollegeCourse cc=new CollegeCourse();
cc.setDepartment(s);
cc.setCourseNumber(s1);
cc.setCredit(s2);
cc.display();
}
}
}
need to submit both the Java file and the text file.
----------- ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly