Determine the output displayed when the button is clicked

Assignment Help Basic Computer Science
Reference no: EM13778017

PART I

Complete the following program exercises. When you have completed the following exercises, compress the program folder and submit the .zip file. These are all separate exercise, so you will have a separate file for each exercise.

Exercises

Determine the output displayed when the button is clicked

Problem One:

Private Sub btnConvert_Click(...) Handles btnConvert.Click
‘Convert Celsius to Fahrenheit
Dim temp As Double = 95
txtOutput,Text = CStr (CtoF (temp) )
End Sub
Function CtoF (ByVal t As Double) As Double
Return ( (9 / 5) * t) + 32
End Function

Problem Two:

Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
‘Rule of 72
Dim p As Double
p = CDbl (txtPopGr.Text) ‘Population growth as a percent
txtOutput.Text = "The population will double in " &
DoubleTime(p) & " years."
End Sub

Function DoublingTime(ByVal x As Double) As Double
‘Number of cars that can be parked
Return 100 * x
End Function

Problem Three:

Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim d As Date = #12/4/2011#
txtOutput.Text = MonthAbbr(d)
End Sub

Funcion MonthAbbr(ByVal d As Date) As String
Dim str As String = FormatDateTime(d, DateFormat.LongDate)
Dim n As Integer = str.IndexOf(" ")
Return str.Substring(n + 1, 3)
End Function

Exercises

Write a program that displays the output shown in a list box. The last two lines of the output should be displayed by one or more Sub procedures using data passed by variables from an event procedure.

Problem One:

Assume that the following is displayed.

According to a 2008 survey of college freshman taken by the Higher
Education Research Institute:
16.7 percent said they intend to major in business.
1 percent said they intend to major in computer science.

Problem Two:

Assume that the label for txtBox reads "What is your favorite number?", and the user types 7 into txtBox before btnDisplay is clicked.

The sum of your favorite number with itself is 14.
The product of your favorite number with itself is 49.

Problem Three:

Assume that the current date is 12/31/2010, the label for txtBox reads "What is your date of birth?", and the user enters 2/3/1984 into txtBox before btnDisplay is clicked.

Reference no: EM13778017

Questions Cloud

How the concepcts existene precedes essence : Make sure to answer the following based upon your understanding of the readings. In addition, it is important that the explanations are in your own words and that you provide examples to illustrate key points.
Application in electronic circuits for an rc circuit : Discuss why an arcing voltage could be a problem with coils used in switching circuits.
What happens to the quantity of tickets : What happens to the quantity of tickets that people are willing to buy and the government bans the aftermarket sale of super bowl tickets would this act as a price ceiling?
Federal and state statutes and regulations : This site offers an overview of negotiable instruments law, federal and state statutes and regulations, and federal and state court decisions. Using this site, search for "negotiable instruments"
Determine the output displayed when the button is clicked : Write a program that displays the output shown in a list box. The last two lines of the output should be displayed by one or more Sub procedures using data passed by variables from an event procedure.
The enthalpy of combustion of c2h6 : The enthalpy of combustion of C2H6 is 1541kJ/mole. How many grams of C2H6 Must be combusted to produce 5.00x104 kilojoules ?
What are the daily tasks that case managers are expected : What are the daily tasks that case managers are expected to perform? What are the additional or ancillary tasks that case managers might be expected to perform
Personal reflection journal entry : adjusting to your life in terms of subjective well-being, diversity, contexts, and / or thinking critically. balancing your priorities, specifically with home, work, school, recreation, and / or family.
Calculate the new absorbency based on values : How would the absorbance of the standard solution have been affected if 0.00050 M NaSCN had been used in place of 0.00040 M? if it changes, calculate the new absorbance based on your values.

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  The beginning of the description of the function

From the same code you provided me with, can you complete the following: Use pseudocoding and (optionally) flowcharting to describe the flow of the main program. If there are functions that support the main flow describe separately in sub sections of..

  Discuss some options for mobile wireless

Please discuss some options for mobile wireless internet connection, and describe the types of hardware that would be involved in making such a connection

  Assume an open addressing hash table

Assume an open addressing hash table, with a load balance α given. What is the expected number of probs needed when searching a key x that is in the table. Note that the development shown in class was for the case that x is not in the table.

  How to solve performance problem of computer

Your friend recommends upgrading RAM to 256 MB to correct performance problems. Is there any other way to solve performance problem? Justify your answer.

  Best and least expensive solution for faulty modem port

When troubleshooting a motherboard, you discover the modem port no longer works. What is the best and least expensive solution to this problem?

  Write a fragment of code that assigns the smallest of x y z

Given the integer variables x , y , and z , write a fragment of code that assigns the smallest of x , y , and z to another integer variable min . Assume that all the variables have already been declared and that x , y , and z have been assigned va..

  The quality of an lcd monitor or lcd screen

Several factors that affect the quality of an LCD monitor or LCD screen, including the specific resolution for which they are geared. How is this resolution described

  Create a gui application with jframe

Create a GUI application with JFrame that contains five labels describing reasons that a customer might not buy a specific product (e.g. "too expensive"). Place a JButton on the JFrame, and code its functionality so that every time the user cl..

  Necessarily memorize to the best of the machine abilities

If a researcher uses computer models for studying the memorization capabilities of the human mind, do the programs developed for the machine necessarily memorize to the best of the machine's abilities? Explain.

  Minimum-spanning-tree problem for lp formulation

The minimum-spanning-tree problem is to find an acyclic subset T + E that connects all of the vertices and whose total weight c(T ) = ce is minimized. Write down the dual of your LP formulation.

  Why computer literacy has become fourth fundamental skill

Explain whether today, computer literacy (knowledge of how to properly use computer and its software applications) has become fourth basic skill.

  Describe a pipelined datapath needed to support

Describe a pipelined datapath needed to support the following instruction. Also specify the values of control signals using the diagram in the text book.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd