Results 1 to 4 of 4
Thread: Time and backup?
- 11-16-2012, 12:04 AM #1
Member
- Join Date
- Nov 2012
- Posts
- 14
- Rep Power
- 0
Time and backup?
Hi
I am currently working with my group on our final project for our first semester. It's supposed to be an extension to a banking program, that allows for the creation of two types of accounts, a current account and a savings account ( each with various criteria that needs to be fulfilled as a minimum). So far we only have a "rough carving" of our system (class hierarchy) which by my suggestion is an abstract superclass called "Accounts" with the "CurrentAccount" and "SavingsAccount" subclasses as it's extensions(would appreciate input on this type of hierarchy aswell, but judging by info in our text books it seems to be to be the most logical one?).
It has to have a function to backup all data everyday at midnight.. I'm thinking the program runs some backupmethod(s) using arraylists with the account type objects stored inside (am I way off on this?). I've been trying to find some Javadocs class which will allow me to make the system run backup of existing accounts (objects) in arraylists using some sort of Time Class, but I'm a little confused as to how they work and which one is the (best) most precise/popular one. All this isn't coded yet, but I feel it's very manageable for us at this stage. My question is really what you would suggest as a more experienced programmer? I need the time and date to be correct so I need help creating my own Time class or using a good one in the libraries.
All help with this is appreciated... I can post my code if you want but it's mostly irrelevant at this stage what my code looks like. I'm more interested in your opinions on the hierarchy "model" I'm thinking of using, the basic backup idea I mentioned and most importantly of all a good time class to use for the automatic backup system.
Many thanks in advanceLast edited by ObedMarsh; 11-16-2012 at 12:10 AM.
- 11-16-2012, 02:22 AM #2
Re: Time and backup?
You can use SimpleDateFormat to format a Date to give you the time.
- 11-17-2012, 04:53 PM #3
Member
- Join Date
- Nov 2012
- Posts
- 14
- Rep Power
- 0
Re: Time and backup?
Thanks ill take a look at it when I have some time, any thoughts on the idea on backup or the class hierarchy? Does it sound like a reasonable setup or do you think I should reconsider doing something different? I'd hate to spend hours pursuing an idea that is poorly chosen.
- 11-18-2012, 01:26 PM #4
Re: Time and backup?
For the backups, you can either just write the data out to a text file in some delimited format, or use java object serialization. To have it happen at a specific interval, Timer (Java Platform SE 6). You could also use the swing version if your app is event driven instead.
Similar Threads
-
Areca Backup 7.2.5
By java software in forum Java SoftwareReplies: 0Last Post: 02-04-2012, 06:38 PM -
Areca Backup 7.2.3
By java software in forum Java SoftwareReplies: 0Last Post: 10-20-2011, 06:16 PM -
backup program using rmi
By alrebatsd in forum Advanced JavaReplies: 1Last Post: 03-30-2011, 11:18 AM -
USB Backup
By Mir in forum New To JavaReplies: 5Last Post: 08-06-2008, 11:29 AM -
Areca Backup 6.0.1
By Java Tip in forum Java SoftwareReplies: 0Last Post: 04-01-2008, 04:12 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks