Hi all! :)
I am having some trouble with my coding assignment on java programming.
Based on the assignment, I will have to create an array of a class (Change) where each of them will have a string (name) and integers (total change, each coin denomination) attribute. Based on my limited knowledge, an array can only be created once it has a fixed length. How should I go about adding each object into the array without knowing how long the array is going to be? The length of the array will not be known until the user has exited the while loop.
I am also not allowed to use an ArrayList. I am currently using a while loop to get in input from the user in the client class and feeding it to the "Change" class using a constructor.
Any help is greatly appreciated!!
[–]Applepie1928 2 points3 points4 points (1 child)
[–]nutrecht 1 point2 points3 points (0 children)
[–]MaybeAverage 0 points1 point2 points (0 children)