Your submission should follow our general guidelines. Include a master
index.html (in our standard format) that contains or links to all the problems.
Use source-highlighting to display your code. Include source-code files and
any required images.
FileCopy.javaas a model to read a textfile and generate an html file with < converted to <, > converted to > and & converted to & Enclose the output in <pre> tags.
JOptionPane. Use the
String.splitfunction to parse an input string such as “R1 1000 R2 2000 R3 2000” into an array of Strings, and then create the corresponding resistor objects. You should consider generating an appropriate Resistor constructor. See Parsing Strings with split for examples.
writeToFileZipFileContents. Put that example into a Java program and demonstrate it with some zip file.
rational.java. Put a debug print statement in the while loop to show intermediate values in the process.
rational.javaas a starting point. Use
longand static functions like
static public Rational add(Rational a, Rational b)for operations instead of (or in addition to) member functions. Incorporate and demonstrate the following capabilities:
System.out.println(" a = " + a);should work if
String latex()that outputs the representation of the object. You can use this in MATLAB documentation. See
rational.m, which results in the following MATLAB document.
void draw(Graphics g, int x, int y)which generates a rational number on the screen centered at location (x, y), that looks like .
Maintained by John Loomis, last updated 6 February 2017