[/COLOR]<I pledge that every program with my name on it shall be written by me (and my co-authors, if any) and that I fully understand the program. Every program I submit shall be entirely my own work unless otherwise attributed. I understand that academic dishonesty not only includes copying other people's work, but also abetting or facilitating copying. Code that is similar to any other submission past or present will get no credit whatever the explanation. I understand that the consequence of academic dishonesty is a grade of 'F' for the class. I pledge to devote my efforts to learning Java by writing my own programs. I shall strive to be attentive to detail and write programs that not only compile and execute correctly, but are easily understandable by myself and other programmers. >
This is what I have to print out. It is currently 804 bytes. I made a program here to print this paragraph out:
<public class pledge1 { public static void main(String[] args) { System.out.println("I pledge that every program with my name on it shall be written by me"); System.out.println("(and my co-authors, if any) and that I fully understand the program."); System.out.println("Every program I submit shall be entirely my own work unless otherwise"); System.out.println("attributed. I understand that academic dishonesty not only includes"); System.out.println("copying other people's work, but also abetting or facilitating"); System.out.println("copying. Code that is similar to any other submission past or present"); System.out.println("will get no credit whatever the explanation. I understand that the"); System.out.println("consequence of academic dishonesty is a grade of 'F' for the class. I"); System.out.println("pledge to devote my efforts to learning Java by writing my own"); System.out.println("programs. I shall strive to be attentive to detail and write programs"); System.out.println("that not only compile and execute correctly, but are easily"); System.out.println("understandable by myself and other programmers."); } }>
How, the program is 1191 Bytes, and I have to compress that (presumably) to under 793 bytes. Maybe I don't have to use system.out.println so many times, and I can save byte space. Also, the paragraph is 804 bytes. I have to make the paragraph no more than 655 bytes, with a total of 793 bytes for the whole entire program. How do I go about doing this?
--- Update ---
I believe this is a way to compress texts, and I can pass in that compressed text to java to execute. Maybe that will save space? The teacher required that the program cannot take any input. I am assuming he means human input. So if that's the case, I can pass in a compressed text file into java.