Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 05-10-2006, 01:19 PM   #1
Member (11 bit)
 
inflames988's Avatar
 
Join Date: Aug 2003
Location: Silicon Valley
Posts: 1,512
Help me--java program

Hi

just took my APCS-A test, so im not really doing anything in class--figured id start up making a new program to keep myself busy. Its going to need to keep track of my daily eating and lifting and running stats. It needs to have a way to SAVE all of this stuff so that the information is still there when i start up the program. This might sound dumb, but wouldnt it all get erased after i exit the program (the stuff that will be input each day by the user). It also needs to have input which i am having trouble with. lastly i would like to have a way that the program knows what the date is, so that it can keep track when i enter stuff into it. I wasnt sure if there was a way for java to read from the system clock and do this. i know that java's random number generator works off of the system clock to generate ints and doubles but i was unsure of if there is a way to access this information directly so that i can use it to keep the dates in order and track progress.

so basically

1.) need help finding a way to make sure the info isnt lost after being input by user
2.) need way for program to know what date it is.
3.) need to know how to get the input from the user. the AP java subset didnt cover this at all, since its kinda tough.

also it might be nice to have a GUI, but i get the feeling that would require a ton of time and effort to get working right. thanks
inflames988 is offline   Reply With Quote
Old 05-19-2006, 10:11 AM   #2
Member (9 bit)
 
DynamicTech's Avatar
 
Join Date: Jan 2006
Posts: 343
A simple GUI does not require a lot of time to setup. It sounds like you just need a basic interface to enter a few parameters. For simplicity:
1.) Use the FileOutputStream class to write to a comma delimited file on your drive.
2.) Use the Calendar class to get the system date.
3.) After creating your textfields, use the textfield.getText() method to grab the user input from your GUI. if you choose not to use a GUI, in your main method use the args[] object to get the user's parameters from the CL:
public static void main(String args[]) {
Program.doThis(args[0]);
Program.doThat(args[1]); }
DynamicTech is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:09 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2