More practice creating, documenting, and testing classes based on a given public interface. Practice reading console input and formatting text. Practice reading detailed specifications.
Your programming work for this assignment must be done in the
TypesAndDecisions
project which you should check out from your SVN
repository into Eclipse.
LargeFacts
class a
bigFact()
method that uses
BigInteger
s. See the
TODO
comments in the file for details.
for
loop and the
charAt()
method of
String
, complete the four
TODO
items in the
StringsAndChars
class.
main()
method of
ScannerExample
to print appropriate prompts for the user.
CubicPlot
. Its constructor should take eight (yes, eight!) arguments:
drawOn(Graphics2D g)
that plots the graph as detailed below. The classes
CubicPlotViewer
and
PlotComponent
are provided. In
PlotComponent
, uncomment the call the
CubicPlot
’s constructor before beginning.
top
,
left
,
width
, and
height
.
String
’s
format()
method and
Graphics2D
’s
drawString()
method to display the equation on the graph.
-width/2
to
width/2
. Plot the graph by drawing a line from the previous point calculated to the next point. (You’ll have to calculate the first point
before the loop.) Be sure to shift your plot according to the required origin. You should also “flip” the y values when plotting so that the y-axis increases up the screen.
Scanner
object
instead of being hardcoded.
top
,
left
,
width
, and
height
.
PlotComponent.java
. We will grade your Wiki contributions using ANGEL. Turn-in your programming work by committing it to your SVN repository.