Confused on where to start?

creating an app that calculates registration fees for a conference

Page 1 of 1

2 Replies - 1350 Views - Last Post: 17 February 2010 - 10:38 AM Rate Topic: -----

#1 Guest_Ashley*


Confused on where to start?

Posted 17 February 2010 - 01:13 AM

I am working on a programming activity and have no idea where to begin.

The problem is to create an application that calculates the registration
fees for a conference. The general conference registration fee is $895 per
person. There is also an optional opening night dinner with a keynote address
for $30 per person. There are also optional preconference workshops.

The application is to have 2 forms. The main form consists of text box controls
that prompt the user to include basic information such as name, company,
address, city, phone, email. There is also a label control that is intended
to display the total cost
The main form includes 3 buttons. "Select Conference Options" "Reset" and "Exit"
when the "select conference options" button is clicked it is intended to
open the second form. The second form allows the user to select the regular
conference registration ($895), the optional dinner, and the other
preconference workshops are in a listbox control. The optional events cannot
be selected without having selected the regular conference registration first.
This form includes 2 buttons "Reset" and "Close" when the form is closed the
TOTAL label on the main form should have a value in its text property.

What I have so far...

I have both of my forms created, and have started creating a standard module. I'm not sure if I
am on the right track and I feel super confused. Here is the code that I have so far...

Module ConferenceRegistrationModule
    ' Code module for the Conference Registration System

    ' The general conference registration fee
    Private Const GENERAL_FEE As Decimal = 895

    ' The optional opening night dinner fee
    Private Const OPENING_NIGHT_DINNER_FEE As Decimal = 30

    ' Declare constants for preconference workshops
    Private Const E_COMMERCE As Decimal = 295
    Private Const FUTURE_OF_WEB As Decimal = 295
    Private Const VISUAL_BASIC As Decimal = 395
    Private Const NETWORK_SECURITY As Decimal = 395

    ' Determine global variables
    Public TotalCost As Decimal         ' Holds total cost


End Module

Any guidance on where to go from here would be GREAT!!! and very much appreciated!

Is This A Good Question/Topic? 0

Replies To: Confused on where to start?

#2 JackOfAllTrades   User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: Confused on where to start?

Posted 17 February 2010 - 07:02 AM

Moved to VB.NET
Was This Post Helpful? 0
  • +
  • -

#3 Asscotte   User is offline

  • D.I.C Addict
  • member icon

Reputation: 35
  • View blog
  • Posts: 610
  • Joined: 08-February 09

Re: Confused on where to start?

Posted 17 February 2010 - 10:38 AM

Why dont you make it in a class, reusable code is way better than a module.

' Class
Public Class CalculateMyBills

' Structure to hold company information
Public Structure Booking
Dim CompanyName as String
Dim CompanyPhoneNumber as string
Dim OtherDetails as string
Dim PreConferanceWorkshop as boolean = false ' Add and remove as needed.
End Structure

Public Sub WriteDetialsToFile (byval Company as Booking)
' Find a way to write to file
end sub

Private Const PriceOfBooking as integer = 100000000000000000 ' (way to expensive) ;P

End Class

That is how I would do it, with a 'const' for the price, and a structure that could be passed to a sub or function, rather than passing many objects. You would then calculate the price in that final sub rather than on the fly, (just to save Processor power and time).

the forms should be done last as they are the most simple.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1