Write A Program Using 2 Parallel Arrays Representing Grade Point And Grades?
Jan 31, 2010
I have to write a program using 2 parallel arrays representing grade point and grades. The grade points range from 0 to 500, however, we are only to use the minimum points per each letter grade in " points " array. This is shown in the code below. You then enter a number from 1 to 500, representing the grade points, and in turn it spits out your letter grade.My problem is this. When I enter a number, say 200, I get a letter " D " grade instead of an " F " grade. It appears that every number range I enter gives me one letter grade less than what it is supposed to be. Also, any number 450 to 500, representing an " A " grade does not even register in my Grades Label.
[Code]...
View 7 Replies
ADVERTISEMENT
Jul 27, 2011
The exercise prior to this one had us use two parallel arrays that store a letter grade (A, B, C, D, F) and the minimum points needed for each grade. The user input the points earned by the student and the program shows their letter grade. It took a minute, but I got that one done, and it does what it's supposed to do.This exercise has us modify that exercise to ask for the (via InputBox in MainForm Load event) total points possible. The grade is then determined by percentage of the total points possible. For instance, if x is the user input, an "A" would be 90% of x.
View 4 Replies
Jun 5, 2011
It is meant to average 15 user-input grades and then from there I have to provide the letter grade that corresponds with the average percent. I understand how to provide the corresponding letter grade, but I don't understand how to get the average. I've tried putting it into arraylist format
View 4 Replies
May 13, 2011
"I need to create a program that will allow the user to enter in 10 test grades from a class. I need to store these grades into an array, and use a loop to add up the total. Then I'll need to output the average, and the letter grade for the average using:
90 - 100 A
80 - 89 B
70 - 79 C
60 - 69 D
Below 60 F"
That's all it needs to do. Here is some code that shows you that the only thing I know how to do is (allow the user to enter in 10 test grades from a class.) The rest I'm so lost on and have a crappy instructor. This assignment is due tomorrow, but the instructor is not available over the weekend.
Here is my This is all I have:
Dim MyNumbers(9) As Integer
Dim Total As Integer
Dim i As Integer
[Code]....
View 9 Replies
Apr 14, 2012
Haveing troubles with an assignment. I am writting code that will allow user to enter a score and the program returns a grade based on the score entered. I can get it to work using "IF" statements but want to use code for ranges. My "IF" code is as follows.......
[Code]...
View 1 Replies
Apr 14, 2012
Haveing troubles with an assignment. I am writting code that will allow user to enter a score and the program returns a grade based on the score entered. I can get it to work using "IF" statements but want to use code for ranges. My "IF" code is as follows.......
[Code]....
View 2 Replies
Dec 10, 2009
My assignment is to have a user enter in big integers using what i think is two parallel arrays. I got this far but now im stuck. I think i need to actually convert the text box input into an array but i do not know how to do that. I am all over the place in this project.
'Created/ Revised by: Jessica Falcetta
'Cap 204 Final Project: Big Integer Project
'Project Purpose: To calculate large integers through parallel arrays
[CODE]...
View 5 Replies
Mar 25, 2009
I am trying to write a program using arrays. The issue I am having is I want to use an array where not only can I use a string value but a numerical value as well.please keep tha answers simpl as I am becoming very frustrated and starting to think progamming is a waste of time
View 2 Replies
Jul 11, 2011
Step 1 - I plot 4 random points on an image in the picture box
Step 2 - I capture the co - ordinates for all the points
Step 3 - I draw a line from point 1 to point 2 (name it line 1)
Queries :
1) I need to draw a line parallel to line 1 passing through point 3
2) I need to draw a line parallel to line 1 passing through point 4
3) Extend the line from both the ends so that I can draw a perpendicular line passing through all the 3 lines so that it becomes a rectangle
View 1 Replies
Mar 13, 2012
how can i sort too parallel arrays?
[Code]....
Those are the two arrays now when i try array.sort(strflavor,decamountsold) or array.sort(decamountsold,strflavor) they are not arraigned properly. I am trying to get them to sort by which flavor sold the least and which flavor sold the most. However when i sort them, the flavors are not matching up with the decimal values.
View 8 Replies
Nov 5, 2011
I just learned basic arrays, I'm writing a program the allows Professor Carver to display a grade based on the number of possible points he enters in the inputbox (strMax). Then the user enters the points he earned in the textbox (dblPoints)
Then I solve the percentage. dblResults = dblPoints/CDbl(strMax) The first step is to store the minimum percentage points in one dimensional array. I did that. The second step is to store the grades in one dimensional array. I did that. The arrays should be parallel arrays. Having trouble with it It then should display the corresponding grade from the strGrades array Not done. I'm having trouble to display arrays in that are parallel.
[Code]...
View 6 Replies
Feb 3, 2010
getting started with creating an index search for parallel arrays. When the user enters the specific "code", and presses enter, the information in the other arrays should be displayed based on its matching index. I'm pretty sure I use "For i = " but I'm lost. I have my arrays set up like this:
Dim code(9) As String
code(0) = "A"
code(1) = "H"
[code]....
View 3 Replies
Jan 4, 2012
In Visual Basic 2005 is it possible to parallel sort three or maybe four arrays? I have a function that is trying to accomplish this but it only parallel sorts the second array with the Array that it is being sorted with. Here is the code
Sub ParallelListBoxSort(ByVal byList As ListBox, ByVal otherLists() As ListBox)
Dim ii As Integer = 0
Dim a As Integer = otherLists.Length
[Code]....
'listToArray' is just a function that converts a list to an 1-Dimensional array and 'setArrayToListCollection' just puts the array back into the appropriated list.
View 2 Replies
Jun 22, 2010
Ive been working on a checkbook application for my visual basic class and I'm a little stumped..
To preface, the values I need to mess with include:
transaction type (checking or deposit)
DTP
check number ("dep" if deposit)
[Code].....
Below is the Change I need to make to my program...
"You will create a set of either collections or arrays (your choice but use just one or the other--don't mix them) scoped at the form/module level. These structures will store all of the input data needed for your checkbook transactions except for the running balance which will continue to be stored in a single module-scoped variable. That is, every input that users made in Assignment 3 will be stored in one of these arrays but you will not store any calculated values. You will not store the transaction type but will store "Dep" or a number in the check number array which will also indicate the transaction type. The Record button will add the current sale's data to these structures using either ReDim for the arrays or an appropriate technique for the collections. (You must ReDim your arrays so that the have just enough space for the data that is in them. Declaring the arrays with a large size with no facility to resize them is not allowed. Don't forget to use the ReDim Preserve syntax to retain the existing array contents when you resize them.)"
I don't know if I make a single array for all the values or if I create a separate one for each. If its a separate one for each I don't understand why an array is needed.
View 9 Replies
Apr 28, 2010
I posted earlier about making a form with an inventory menu I realized i wasnt doing it the wrong way I am suppose to use 3 parallel arrays for Inventory Name, Quantity on hand, and Price. And then Im suppose to make four buttons recieve, ship, value, and print and it suppose to update the new quantity on hand text box this homework is really getting on my nerves Ive been tryin to do it for 2 weeks this is what i have
[Code]...
View 2 Replies
May 25, 2011
I have 7 parallel arrays, and I would like to sort them all by two of them. That is I have the following arrays...
_weeknum()
[code]....
View 9 Replies
Aug 26, 2010
I need to know how to code a windows application program that will make it possible for customers to place orders online. Customers will have access to menu using a combobox,containing items available. The text file contains all menu items and the price of each item, as well as number of orders for each item. The file is created with a notepad containing 5 menu items.the first line contains the name of the item,second line contains the price and the third contains total number of orders which initially is 0. So far so good i know how to check if the file exists or not,and populating the the combobox, but ther's an instruction where i have ensure that the number of menu items does not exceed 100, and if so,should display an error message.and should validate to ensure that the total number of orders is>0,if not,re display the input box with a suitable message. Then on the save(menustrip),should write the whole textfile from arrays in memory,clear the combobox,display the message. Also has a process payment button where it should read through the arrays with a for next loop,then shouold write function called amount due,which recieves the total orders as a single data type,where the value for amount due is calculated as total orders*price.CAN SOMEONE PLEASE HELP ME OUT SINCE IM A BEGINNER IN VB2005.
View 1 Replies
Jul 4, 2009
I'm trying to code a program that averages a grade from a list box, but the numbers in the second list box could change, so not sure how to code that. It should list the letter grade and the average, then if they don't enter a grade, should tell you to enter a grade first before hitting the average button.
Public Class MainForm
Dim ErrorMsg As String
Dim intNum As Object
[Code].....
View 5 Replies
Nov 9, 2009
I am trying to make a simple program that utilizes lists, loops, arrays, and multiple forms. I started the program in which I have incorporated lists and loops already.A summary of my program; I am trying to be able to add a name to a combobox list, and assign a grade to that particular person (grade of A = 4, b = 3, ect ect). I am assuming I should utilize the array concept at this point when assigning the grade to the name, but I am not exactly sure what to do. I have attached a screen shot of my form, and I will post what code I do have so far.Also, when all the grades are entered with their corresponding names, I want to also have a summary screen pop-up with the names and which grades they received, plus the average.[code]
View 13 Replies
Feb 19, 2010
I ma trying to create a program to calculate my math grade. The way my math teacher explained the grading scale was each test is worth 1 point and each quiz is worth .2 points.
So as an example (add both sides up then divide by both sides)
100 =1
80 = 1
15 = .2
18 = .2
213 divide by 2.4 which equals your grade of 88.75
There are more quizs and tests in the semester and I want the numbers to change with the number of quizs and tests entered. The only problem is I am not sure how to code it. I though I would use IF AND statements but I am not sure where to start.
View 8 Replies
Jan 16, 2012
I have a service that scans network folders using a parallel.for method. However recently I am finding if I stop the service then while windows says the service is stopped the process is still running in task manager. However it is at 0 cpu and the memory does not change. If I try and end the task (even a force in command prompt) it just says access denied and i have to reboot the server. What would be the best way to make sure everything terminates? I thought of adding a global Boolean that in the stop procedure it turns true and part of my parallel code will check for that and call s.stop.
View 1 Replies
Apr 6, 2011
Objective: Combine byte arrays, read specific sections, and then cut byte array at specified point.
Private Sub DataArrival(ByRef aBot As xyzSocket, ByRef theData As Byte())
Dim RDLength As Int32
If aBot.ReceivedData Is Nothing Then[code]....
I'm not sure if I have this right to begin with because I can't test it without having it completed.
View 6 Replies
Nov 19, 2010
i created a list of picturebox arrays in my program :
Dim MyPicArray As New List(Of PictureBox)
and i used this code to add them:
MyPicArray.Add(New PictureBox())
[Code].....
the above code works the pictures are created in the form but now i want to write events for them, for example in the 'Click' event a messagebox shows. i don't know how to write the procedure i have tried this but it didn't worked :
Private Sub MyPicArray_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyPicArray.Click
MessageBox.Show("It Works!")
End Sub
View 3 Replies
Apr 10, 2010
I've been making a program whereby users names and numbers must be stored in external files. At the moment I can get the names to read and write to a file with these lines:
Imports System.IO
Public Class frmDefaultMenu
Private Sub frmDefaultMenu_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code].....
Where each line has a name, a seaparator (,) and then the corresponding number.
When the program loads I would like it to be able to access that file, and store all the names into an array named ExistingUsers() and all the Numbers into an array called ExistingNumbers(), and then when a new name is added in the textbox, it is assigned the number "100" and placed at the end of the array, then when the application quits OR straight away, the external files are updated.
View 5 Replies
Jun 4, 2009
I hve been working with points a lot recently, and I have been wondering if there is a way to set a point without setting point.x and point.y separately. For example for (3, 5): Point1 = (3, 5) But that isn't right
View 4 Replies
Jan 21, 2012
How will I send data or signal to H-Bridge then to DC Motor using parallel port in vb.net?
View 2 Replies
Nov 22, 2010
I Have a complex Class Structure that holds a large amount of data in the form of multiple nested arrays that I want to save to a file and retrieve everytime I use my program.. How do I do this? I am using VB10 Express.
View 5 Replies
Mar 23, 2012
I'm making a taskbar for something (I'll be creating similar to the windows taskbar).
I've managed to get all process objects that would be in the taskbar, how can I get the icon too?
View 1 Replies
Mar 4, 2010
I am currently working on a program that takes Visual Basic data in the form of a text file, and then stores this data in C++. Some of the data from Visual Basic is of the type Decimal. C++ has no built in type equivalent to decimal. I don't want to use double because there is a possible loss of significant figures if the numbers are large enough.One option is write my own decimal class.
View 2 Replies
Jan 30, 2010
I was wondering if there was a way to directly convert the integer DayOfWeek returns into a string representing the day like Monday, Tuesday etc.
Sample code:
MessageBox.Show(Date.Today.DayOfWeek)
This will return 6 (as of today). Is there a way to directly convert this into Saturday, for example? I don't really care what it really converts it into, but I want to do away with my Select Case:
Select Case Date.Today.DayOfWeek
Case 1
day = "Monday"
[Code]......
View 5 Replies