Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Joel McNary wrote:OK, let's start by looking at the first problem...array index out of bounds. You are getting tokens[1], [2], etc..., but those values do not exist. So what you want to do is check to see if those values exist first and then read them. If they don't exist...what should your application do? What do you (or your instructor) want the application to do in that case (typical answers are "Use a default value" and/or "throw an exception")? In any case, can you translate that logic to code? If the value exists, then read it, else do something else. (Hint: tokens.length will be useful)
There are three kinds of actuaries: those who can count, and those who can't.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Joel McNary wrote:I agree with Piet
Joanne
Charles Cole wrote:I'm not sure how to call upon the other classes to assign the default values rather then assigning them again in the main class.
Joanne
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:If the GeometricObject outputs its data in text form
Joanne
There are three kinds of actuaries: those who can count, and those who can't.
Joanne
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |