programming and visual basic

visual basic and programming

Page 1 of 1

1 Replies - 1108 Views - Last Post: 18 April 2010 - 01:38 PM Rate Topic: -----

#1 careem  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • 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
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
B) 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
B) 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
B) 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  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4405
  • View blog
  • Posts: 12,262
  • 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!

:)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1