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 FundamentalDataTypes
project inside Eclipse. Use the SVN Repository Exploring
perspective to check out this project, then switch back to the Java
perspective.
bigFact()
method to the LargeFacts
class so that it 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.
PlotComponent
so that the coefficient values are read using a Scanner
instead of being hardcoded.
-width
to width
. Plot the graph by drawing a line from the previous point calculated to the next point. (You’ll have to calculate the first point outside 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.
top
, left
, width
, and height
.
Turn in your programming work by committing it to your SVN repository.