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.
JOptionPane
.
Use the String.split
function 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.zip
as a starting
point. Incorporate
and demonstrate the following capabilities:
static public Rational add(Rational a, Rational b)
and static public Rational multiply(Rationial a, Rational b)
invert()
that swaps num and denom, thereby inverting
the rational number. Which is better: (a) public void invert()
which changes
the current value or (b) public Rational invert()
which returns a new
Rational?
Maintained by John Loomis, last updated 31 January 2020