• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

First Full Program

 
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey People,

I got the idea to do this in work.

I am trying to make a new booking sheet for my work (fitness instructing).

Anyway, I got some GUI stuff going on, some work some dont yet.
but I am looking for the best way to implement some aspects of the program.

I will try to show images.
Here is what the program looks like:


and I would like the sheet area to have a booking sheet like this, if possible:


But I need to be able to store, Name & Member Number as a string on the sheet, and also store if that booking is an induction/program so ints for this.
I also want to store how many of each induction/program per day, so that the day picker can select dates and calculate how many people were inductions/program.

what would be the best way to approach this?

all help grately appreciated.

davy
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations -- looks like a good start.

The most important thing is to break the problem down. Divide things into modules that are as independent as you can make them, and work on the modules separately, testing them often both separately and together.

Coarsely, I'd divide the whole program into three chunks:
  • Data structures to store sheets and events
  • A storage module to save and load instances of these data structures
  • A GUI to let the user interact with the other two modules.


  • When you say things like "I need to be able to store, Name & Member Number as a string on the sheet, and also store if that booking is an induction/program so ints for this. I also want to store how many of each induction/program per day, so that the day picker can select dates and calculate how many people were inductions/program" you're mixing these three quite distinct functions all together, and that's not good -- it leads to messy, hard to understand code. Instead, think of them separately: what goes into the data structures; how the load/store machinery will work; and what methods the GUI will call on the other parts to make things happen.

    And compile and test often -- never go more than a minute or two without compilable code. The more code you write without compiling, the more time you spend randomly hunting for bugs!
     
    Davy Kelly
    Ranch Hand
    Posts: 384
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Cheers Ernest,

    I know what your saying, I have been doing this for the GUI part of the program.
    I found this to be very challenging but rewarding.

    I was giving a break down of what the program is to do. I know it sound a lot, but it is not really.

    I think what I am looking for help on, is:
    Can the sheet look like the image above yet still accept strings only in the spaces? if so how?
    And what would be the best way to store the booking sheet, as I would need to store everyday?

    I really don't want people writing my code, but I am looking for pointers in the right direction on what to use. as I don't know that whole language, only enough to have passed the exam, which was 1.2 but learned 1.3 and got HFJ 2.0 covering 1.5.

    I made the GUI first as I thought it would be easy to add in classes/methods to work on the buttons, after they work on their own.

    Thanks again Ernest, and thanks for anyone else who can steer me in the right direction.

    davy
    [ February 27, 2007: Message edited by: Davy Kelly ]
     
    Davy Kelly
    Ranch Hand
    Posts: 384
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I wonder if you could give me your opinions on this idea for the booking sheet:

    make a panel that holds JTextFields for the time part
    and JTextAreas for the part to book people in

    so make the each row as a separate area, and load all of those areas?
    a bit like this excel image:


    would this be an easy solution?

    davy
     
    Don't get me started about those stupid light bulbs.
    reply
      Bookmark Topic Watch Topic
    • New Topic