Top.Mail.Ru
March 31st, 2005 - Java developers — LiveJournal
? ?

Java developers

March 31st, 2005

10:12 am - eddiemac911 - misa is muy, muy Java impaired (my jar jar impersonation)

Hello everybody, I'm relatively a newbie when it comes to programming with Java. I was wondering if somebody wouldn't mind looking over the code I have written so far for my Java class and see if it looks ok.  It is supposed to do the following:


    •     The user will be prompted for the current price for the stock being processed.
    •     The program will then read a series of investments in from a file, “investment.txt”:
    ◦      The investments will all be for the same stock (all IBM or Microsoft …)
    ◦     The investments will have different purchase dates and purchase prices.
    ◦     The investments will be ordered such that the oldest stock (one purchased first) is on the first line in the file.
    ◦     The file will have the following format (ticker, purchase price, date, num shares):

IBM,6.50,5/3/1987,100
 IBM,7.50,12/1/1987,100
 IBM,9.00,3/14/1990,100
 IBM,12.00,4/2/1996,100
 IBM,23.45,8/26/1999,100
 IBM,18.00,1/5/2001,100
    •     The data from the file and the current price entered by the user will be used to create new Investment objects.
    •     The investments will be stored in a data structure that obeys the FIFO protocol (a Queue)

I believe I have everything taken care but would greatly appreciate any suggestions to improve the code.


Investment Code belowCollapse )

11:57 am - popcorn09 - tips?

I hope this is not off-topic here. In that case please remove it if you have to.

I have been working in Java for a while now though haven't had an opportunity to learn much. I've mainly done Core Java with manipulations with strings and JUnit etc.

I want to learn better but don't know where to start from. Can anybody here direct me to a good tutorial on Java that has sample problems as well helping me with self-study? I just want to be a better Java developer!

Thanks in advance!
Powered by LiveJournal.com