I need a hand learning to search for code

bocaccio

Member
Joined
May 6, 2010
Messages
5
Programming Experience
Beginner
I need some help learning to search for code. If someone could just look at what I have and tell me or give me a hand on searching to find my code. The text book I have it not very helpful. I guess what I am asking is just like..for the "reset" button or "calculate" what should i use in google to search for the code...reset code for vb.net is what I tried but came up with nothing.
And my Exit button needs a user confirmation and I used end but it only closes with no confirmation.


This is an actual assignment I am not asking for answers. Only help finding them. Thanks




For this assignment, you will create a Visual Basic 2005 application to calculate movie rental fees and due dates. A screen shot of the desired UI is shown in the following image. You can also download a running example of the project. Please be aware that the example program does not necessarily demonstrate all of the functional requirements, and it is intended only as an example. You are responsible for meeting the listed requirements. Please refer to the following information for the complete requirements.


Project Requirements

Create a form with the following objects labeled appropriately:
Rental Date (date/time picker)
Due Date (read-only text box, formatted as Date)
Rental Type (radio buttons for New Release, Older Movie, Oldest, and Boring)
Frequent Renter Club? (check box)
Rental Charge (read-only text box, formatted as currency)
Number of Days (read-only text box)
Frequent Renter Discount (read-only text box, formatted as currency)
Total (read-only text box, formatted as currency)
Calculate button (initiates calculations)
Reset button (sets all fields back to original values)
Exit button with confirmation from the user
Rental charges and number of days allowed
New Release, $3.50, 1 day
Older Movie, $2.50, 3 days
Oldest and Boring, $1.00, 5 days
Rental charge will display above values depending on which type of movie is selected.
Number of Days will display the number of days allowed for the movie depending on the type selected.
Due Date will display the date the movie is due to be returned
Total is rental charge less a 10% discount if the renter is a member of the Frequent Renter Club.
Read-only fields should only be updated when either the calculation or reset button is pressed. Do not use content update event handlers for these updates.
Do not allow the user to resize the form.
Remove minimize, maximize, and close buttons from the title bar.
 
Well whenever I search for something that I am having trouble with -- the first thing is you need to identify what you want to know. For example;

And my Exit button needs a user confirmation and I used end but it only closes with no confirmation.

....so we need a confirmation when the form or application closes. Well that pretty much sums up what we want to do.

So I would search on vb.net formclosing confirmation

The rest of the items on the list to do are really basic logic. Start with pseudo code for each process / event that happens.
 
Thanks for googling that for me :D

I am not an expert with pseudo code. Does that mean I am doomed for the next 4 weeks? My ITP400 class is 5 weeks long.
 
No you are not doomed. You don't have to be an expert with pseudo code, it's what it says it is. Basically it's as high / low as you need it to be to understand what you need to do for the event / process.

pseudo code = Don't think of how you would program it, think of how you would say to do it.

Separate your requirements:

Controls:
VB.NET:
Rental Date (date/time picker)
Due Date (read-only text box, formatted as Date)
Rental Type (radio buttons for New Release, Older Movie, Oldest, and Boring)
Frequent Renter Club? (check box)
Rental Charge (read-only text box, formatted as currency)
Number of Days (read-only text box)
Frequent Renter Discount (read-only text box, formatted as currency)
Total (read-only text box, formatted as currency)
Calculate button (initiates calculations)
Reset button (sets all fields back to original values)
Exit button with confirmation from the user

Information / Data:
VB.NET:
New Release, $3.50, 1 day
Older Movie, $2.50, 3 days
Oldest and Boring, $1.00, 5 days

Design Rules:
VB.NET:
Rental charge will display above values depending on which type of movie is selected.

Number of Days will display the number of days allowed for the movie depending on the type selected.

Due Date will display the date the movie is due to be returned

Read-only fields should only be updated when either the calculation or reset button is pressed. Do not use content update event handlers for these updates.

Do not allow the user to resize the form.

Remove minimize, maximize, and close buttons from the title bar.

Business Rules:
VB.NET:
Total is rental charge less a 10% discount if the renter is a member of the Frequent Renter Club.

So we determine that based on requirements that the 3 buttons will 'run' the form.

Exit Button pseudo code:
VB.NET:
Button Clicked

Get Confirmation 

If OkToClose Then
     Close Form
Else
      don't close form

Reset Button pseudo code:
VB.NET:
Reset button clicked

Set to Default date : Rental Date (date/time picker)
Clear : Due Date
Clear selections : Rental Type 
Clear selection : Frequent Renter Club?
Clear or set to $0.00  : Rental Charge
Clear or set to 0 : Number of Days
Clear or set to $0.00 : Frequent Renter Discount 
Clear or set to $0.00 : Total

Calculate buton pseudo code:
VB.NET:
Show number of days selected

Calculate return date
Show return date

Calculate total
Display total

In the Exit button pseudo code I went into a little more detail, you'll notice it could almost be copied and paste into the actual code. In the Calculate button there isn't anything similar to code, this is a pretty high level approach to this process. Any of the 5 different items in that button could be broken into a more detailed list of steps if need be.
 
Back
Top