Assignment Objectives By the end of this assignment you shou

Assignment Objectives

By the end of this assignment you should be able to design, code, run and test original Java programs that use class inheritance, polymorphism and exception-handling.

Instructions

Part II: Java Source Code Reformatter (4 points) Filename(s): ReformatCode.java Public class: ReformatCode Package-visible class(es): none Write a program that reformats Java source code from the next-line brace style to the end-of-line brace style. The program is invoked from the command line with the input Java source code file as args [0] and the name of the file to save the formatted code in as args [1]. The original file is left untouched. The program makes no other changes the source code, including whitespace. For example, the following command converts the Java source code file Test.java to the end-of-line brace style iava ReformatCode Test.iava Test2.iava Test.java: public class Test public static void main (String[] args) System.out.println (\"Test 1\"); System.out.println (\"Test 2\");

Solution

Public class test (

Public Static void main (string [] args) {

System.out.println(\"Test 1\");

System.out.println(\"Test 2\");

}

Assignment Objectives By the end of this assignment you should be able to design, code, run and test original Java programs that use class inheritance, polymorp

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site