Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: VB Help  (Read 2842 times)

0 Members and 1 Guest are viewing this topic.

ryano

  • Guest
VB Help
« on: April 10, 2008, 09:33:25 PM »
Can anyone help me out on this problem...



Create a String Array with the following information from user input. Use the values below as your input (from the user) using textboxes as your input.  The array will be two-dimensional with the names in Row 0 and the grades in Row 1.

   John Henry   95
   Mickey Mouse   75
   Minnie Mouse   100
   Elvira   65
   Harry Potter   85
   Hermione Granger   99
   Lucius Malfoy   45
   Fox Mulder   92
   Dana Scully   99

Place the values into the String Array called GradeArray. 

Sort the list in order by Grade in Ascending order.  Use either the Insertion or Selection Sorts to sort your array.

Use the binary search as described on pages 275-279 and Figure 7.14 where necessary. 

Using separate For loops, calculate the following:
a)   average grade
b)   maximum grade
c)   minimum grade

In a Listbox, display each person’s name and grade in order by grade from highest to lowest (descending) with appropriate headings. Hint:  in a For loop, use the index of the array for placement in the list.

In another Listbox display the average grade, the maximum grade and the minimum grade with appropriate headings.


Aegis



    Expert

    Thanked: 67
    • Yes
    • Yes
    • Brian's Mess Of A Web Page
  • Experience: Experienced
  • OS: Windows 10
Re: VB Help
« Reply #1 on: April 11, 2008, 01:07:04 AM »
By VB, are you asking for help with Visual BASIC?


"For you, a thousand times over." - "The Kite Runner"

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: VB Help
« Reply #2 on: April 11, 2008, 05:07:27 AM »
Are you referring to VB or VB.NET?

Your teacher and the book seem to have some very definite ideas on how you should approach this problem. This is reason number one why we don't help with homework.

Personally I would use a disconnected recordset and use the SQL functions of MIN, MAX and AVG. Apparently, pages 275-279 and Figure 7.14 notwithstanding, this would be an incorrect response to the problem.

 8)

Hint: You have a better shot of getting help with homework if you post whatever solution you have developed on your own and then request assistance.


« Last Edit: April 11, 2008, 06:10:30 AM by Sidewinder »
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein