Question: GridText - an object for converting text a 2 - D Character array. fields gridText: an ArrayList that has one line / row of text

GridText - an object for converting text a 2-D Character array.
fields
gridText: an ArrayList that has one line/row of text at each index.
methods
GridText(source, delimiter): The source string should be split by the delimiter using the String split method and each string in the resulting array should be added to the gridText list in order.
GridText(source, numLines): The source Scanner should be read one line at a time (a maximum of numLines times) using the nextLine method and each line should be added to the gridText list in order. If there are fewer than numLines in the source Scanner, then the resulting GridText should have the number of lines retrieved from the scanner as its number of rows. If there are more than numLines in the source Scanner, then the resulting GridText should have numLines rows in the arraylist.
numRows() : this method should return the number of strings in gridText.
length(row): this method should return the number of characters in the row at the index specified by row
at(row,col): this method should return the character at row,col or null if either the row or the col are out of bounds.
Algebraic Fraction
The perpose of AlgebraicFraction is to have an Object based version of a fraction so that you could represent Objects with a fractional relationship. An example would be
a
b
c
d
. An algebraic fraction should be reduced during it's construction, so if the numerator were
a
b
c
and the denominator was
c
d
, then the c in the numerator and the c in the denominator would cancel, and the fraction would become
a
b
d
.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!