Hello Everyone,
First I'd like to mention that I am currently a networking/IT student and am currently taking an intro to programming class that is required as part of the curriculum. I am by no means a programmer so please forgive my ignorance.
I am currently working on an assignment that states the following
1. Get mobileProvider
2. Get dataOption
3. Set dataPackage to true or false
4. If mobileProvider is equal to 1 AND dataPackage is equal to True, then display they have selected ATT with a dataPackage.
5. Else if mobileProvider is equal to 2 OR dataPackage is equal to True, then display they have selected Sprint or they have selected with a Data Package.
6. Else if mobileProvider is equal to 3 AND dataPackage is equal to False, then display they have selected Verizon and No Data Package.
This algorithm is the 3rd and final step of a console program assignment. I "bolded" the part that confuses me the most.
Here is the code I have written so far (please be gentle).
Notice I have left out the second part that states "or they have selected with a Data Package" because I just can't figure out how to make it decide between which statement to display.
Thanks in advance for your tips and suggestions.
First I'd like to mention that I am currently a networking/IT student and am currently taking an intro to programming class that is required as part of the curriculum. I am by no means a programmer so please forgive my ignorance.
I am currently working on an assignment that states the following
1. Get mobileProvider
2. Get dataOption
3. Set dataPackage to true or false
4. If mobileProvider is equal to 1 AND dataPackage is equal to True, then display they have selected ATT with a dataPackage.
5. Else if mobileProvider is equal to 2 OR dataPackage is equal to True, then display they have selected Sprint or they have selected with a Data Package.
6. Else if mobileProvider is equal to 3 AND dataPackage is equal to False, then display they have selected Verizon and No Data Package.
This algorithm is the 3rd and final step of a console program assignment. I "bolded" the part that confuses me the most.
Here is the code I have written so far (please be gentle).
VB.NET:
If mobileProvider = 1 And dataPackage = True Then
Console.WriteLine("You have selected ATT with a Data Package")
ElseIf mobileProvider = 2 Or dataPackage = True Then
Console.WriteLine("You have selected Sprint")
ElseIf mobileProvider = 3 And dataPackage = False Then
Console.WriteLine("You have selected Verizon and No Data Package")
End If
Notice I have left out the second part that states "or they have selected with a Data Package" because I just can't figure out how to make it decide between which statement to display.
Thanks in advance for your tips and suggestions.
Last edited: