im a bit stuck! im trying to write a package that performs arithmetic on a weight object (e.g. in pounds and ounces). ive written a class file to create the weight object (this works) and im going to write a method to read the weight from a file into a
string, and then convert the string representation of the weight into a necessary format to create my weight object. im stuck on the methods, i want an addweights method that adds 2 weights together and output the result, but im confused as to what the method declation will look like
something like:
public void addWeights("Weight object 1", "Weight object 2) <--what goes in there?? {
//implementation
please help!