Hi everyone, im still new to this forum and started to learn about visual 6,
i have situation below, this program to obtain reader name and bonus point earned

menu

File Edit Help
Points Clear About
Summary __________
Exit Font
Color

Quesstion,
For Points menu command what is a suitable call function procedure to calculate the points using this schedule below?
Number of books read Points
First three books 10 points each
Next three books 15 points each
All books over six 20 points each

for summary menu - to display the average number of book read for all reader in that session?could you pls to give an idea?

thanks for helping

Your post doesn't really have enough detail for anyone to help you. Are you asking how to code a menu "click" event procedure? Or do you need to know how to call a function from another module? Or are you looking to find out how to calculate some result?

Your post doesn't really have enough detail for anyone to help you. Are you asking how to code a menu "click" event procedure? Or do you need to know how to call a function from another module? Or are you looking to find out how to calculate some result?

err..so sorry:(,ya actually im looking some idea to calculate some result, base on the input reader name and no of the book read, i need to calculate some result, point that they will get base on the table point table below,

Point Table
Number of books read Points
First three books 10 points each
Next three books 15 points each
All books over six 20 points each


Form: Use text boxes to obtain the reader’s name and the number of books read. Use a label to display the number of bonus points.

The Points menu command should call a function procedure to calculate the points using this schedule:

The Summary menu command display the average number of books read for all readers that session.

The Clear menu command clears the name, the number of books read, and the bonus points and then resets the focus.

The Color and Font menu commands change the color and font of the information displayed in the bonus point’s label.

i'm attach as well the menu, i need some idea on how to calculate the point, summary.

Attachments menu.png 4.59 KB
public function calcPoints(booksRead as integer) as integer
dim points as integer
dim booksRemaining as integer

Points = 0
booksRemaining = booksRead
if booksRemaining > 0 then
    points = min(booksRemaining,3) * 10
    booksRemaining = booksRemaining - 3
end if
if booksRemaining >0 then
    points = points + min(booksRemaining,3) * 15
    booksRemaining = booksRemaining - 3
end if
if booksRemaining > 0 then
    points = points + booksRemaining * 20
    booksRemaining = 0
end if
calcPoints = points
end function

Edited 5 Years Ago by ChrisPadgham: n/a

This article has been dead for over six months. Start a new discussion instead.