Results 1 to 4 of 4
  1. #1
    ObedMarsh is offline Member
    Join Date
    Nov 2012
    Posts
    14
    Rep Power
    0

    Default 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 advance
    Last edited by ObedMarsh; 11-16-2012 at 12:10 AM.

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,788
    Rep Power
    7

    Default Re: Time and backup?

    You can use SimpleDateFormat to format a Date to give you the time.

  3. #3
    ObedMarsh is offline Member
    Join Date
    Nov 2012
    Posts
    14
    Rep Power
    0

    Default 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.

  4. #4
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default 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

  1. Areca Backup 7.2.5
    By java software in forum Java Software
    Replies: 0
    Last Post: 02-04-2012, 06:38 PM
  2. Areca Backup 7.2.3
    By java software in forum Java Software
    Replies: 0
    Last Post: 10-20-2011, 06:16 PM
  3. backup program using rmi
    By alrebatsd in forum Advanced Java
    Replies: 1
    Last Post: 03-30-2011, 11:18 AM
  4. USB Backup
    By Mir in forum New To Java
    Replies: 5
    Last Post: 08-06-2008, 11:29 AM
  5. Areca Backup 6.0.1
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 04-01-2008, 04:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •