Project 16 lingo

4 views
Skip to first unread message

Grant

unread,
Aug 2, 2011, 11:45:39 AM8/2/11
to BYU 142 Summer 2011
I think I get the idea of project 16, but I want to make sure I got
the lingo right so I don't miss anything.
Is this the kind of thing that should go in Stock class :

purchasePrice = 1000;
currentValue = 300;
Profit = purchasePrice - currentValue;
System.out.println("Stock Profit is: " + Profit);

?

Then in my driver I just call the Profit method for a new Stock and it
will print out "Stock Profit is: 700".

Is that what the project wanted me to do?

Lane - TA

unread,
Aug 2, 2011, 12:16:00 PM8/2/11
to byu-142-s...@googlegroups.com
Yeah that is one way you can do it. You could also have your profit method return a double and not print anything out.

Benjamin Kemer

unread,
Aug 5, 2011, 6:08:46 PM8/5/11
to byu-142-s...@googlegroups.com
Just working on the driver currently, I was just wondering generally the important features which may be missing from the code while presented.  For instance, I figured initially that a great deal would probably be similar to the original interface project.

class Driver{

double (method or variable considered a public double) = new (same method or variable)("Label", numerical value);

}

Sarah Morley

unread,
Aug 5, 2011, 6:11:47 PM8/5/11
to byu-142-s...@googlegroups.com
I'm don't really understand your question. What do you mean by "while presented?"

Sarah
Reply all
Reply to author
Forward
0 new messages