programming and visual basic

Page 1 of 1

1 Replies - 1282 Views - Last Post: 18 April 2010 - 01:38 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=168781&amp;s=9e7f99d90eb60a7e91e10f653e3adf8d&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

#1 careem

Reputation: 0
• Posts: 1
• Joined: 18-April 10

programming and visual basic

Posted 18 April 2010 - 01:30 PM

I need work on a home assignment, its programming and visual basic
Here are the questions:
1)
if a > b is true, then which of the following is always true?
a) a = b
a < b
c) a = 10
d) a >= b

2)
assume a is 30 and b is 20. which of the following evaulates to true?
a) a > 3 and a > b or b > 100
a > b or b > 4 or b = 10
c) a <= 10 or b > a and a not = b
d) two of these are true.

3)
The MidWest sales region of acme computer company consists of five states- illinois, indiana, iowa, missouri, and wisconsin. About 50 percent of the regional customers reside in illinois, 20 percent in indiana, and 10 percent in each of the other three states. Suppose you have input records containing Acme customer data, including state of residence. To most efficiently select and display all customers who live in the Midwest sales region, you would ask first about residency in?
a) illinois
indiana
c)either iowa, missouri, or wisconsin- it does not matter which of the these three is first.
d) any of the five states- it does not matter which one is first.

4)
Psuedocode question with a chart:
Assume you have created a mechanical robot that can perform the followng tasks:
a) stand up
sit down
c) turn left 45 degrees
d) turn right 45 degrees.
e) take a step
f) am I ( the robot) touching somthing?

place two chairs 27 feet apart, directly facing each other. Write pseudo code describing the logic that would allow the robot to start from a sitting position in one chair, cross the room, and end up sitting in the other chair.

5)
study this complete visual basic program that uses if statement, and then answer questions:
Module drinkingAge
Sub Main()
Dim myAge As Interger = 22
Dim allowToDrink As String
Dim DrinkingAge As Interger = 21
Dim notYet As String = " You are too young to drink"
Dim DDTM As String = "Do not drink too much"
If myAge < DrinkingAge Then
allowToDrink = "No"
else
allowToDrink = "No"
msgBox (notYet)

End If
msgBox ( ' Myage:'& myAge)
msgBox("Allow to drink:"& allowToDrink)

End sub
End module

1) What is the exact output when this program executes?

2 )What is the exact output if the value of myage is changed to 20?

3 )What is the exact output if the expression in the if statement is changed
to myAge <= DrinkingAge
4) What is the exact output if the variable named allowToDrink is
initialized with the value " No"

6)
The Some interest Credit Company provides loans to customers at 1.5 percent interest per month. Design an application that gets customer account data that includes an account number, customer name, and balance due. For each customer, display the account number and name; then display the customer's projected balance each month for the next 10 months. Assume that when the balance reaches \$10 or less, the customer can pay off the account. At the beginning of every month, 1.5 percent interest is added to the balance, and then the customer makes a payment equal to 5 percent of the current balance. Assume the customer makes no new purchases.

7)
Write a VISUAL BASIC program to accept numeral values of any unit, sum up the total, calculate the average, and then Output the result with a proper unit.
Requirements for processing:
(1) Tell user the purpose of the program
(2) Tell user how to stop entering data and calculate result
(3) Tell user enter the unit (such as mile, meter, pound, etc)
(4) then start a loop sequence by telling user enter value
(5) Display an end of program message

Attached File(s)

Is This A Good Question/Topic? 0

Replies To: programming and visual basic

#2 Martyr2

• Programming Theoretician

Reputation: 4782
• Posts: 12,968
• Joined: 18-April 07

Re: programming and visual basic

Posted 18 April 2010 - 01:38 PM

Sorry, but read the board rules. We do not do people's homework for them. We simply assist in helping people with their code and solving coding problems. Thanks again for following the rules!