Identify the errors

Assignment Help Programming Languages
Reference no: EM13750438

1. Identify the errors in the following program segment.

Dim nums() As Integer = {1, 2, 3)
For Each num as Integer In nums
Num += 100
Next
MessageBox.Show(CStr(nums.Sum)

2. Determine the output displayed when the button is clicked:

Structure College
Dim name As String
Dim stat As String
Dim yearFounded As Integer
End Structure
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim school As College
school.name = "USC"
school.state = "CA"
school.yearFounded = 1880
‘Now.Year is the current year
Dim age As Integer = Now.Year - school.yearFounded
txtOutput.Text = school.name & " is " & age & "years old."
End Sub

3. Write a program using the file Baseball.txt that requests a team as input from a list and displays the players from that team.
The players should be sorted in decreasing order by the number of hits they had during the season. The Baseball.txt file contains data about the performance of major league baseball players during the 2009 regular season. Each record of the file contains four fields - name, team, atBats, and hits. Some lines of the file are as follows:
Aaron Hill, Blue Jays, 682, 195
Ichiro Suzuki, Mariners, 639, 225
Derek Jeter, Yankees, 634, 212
The output should look like the following:

1534_program.png

4. Determine the errors in the following code.

Structure Vitamins
Dim a As Double
Dim c As Double
End Structure
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim minimum As Vitamins
minimum.c = 60
minimum.a = 5000
lstOutput.Items.Add(minimum)
End Sub

Reference no: EM13750438

Questions Cloud

What is the largest source of funds for woodbury : What is the largest source of funds for Woodbury. The second largest? What is the largest source of expenditures. The second largest
Did the cold war change americas role in the world : Did the Cold war change America's role in the world? Explain your answer. Was the outcome of the war beneficial or detrimental to the United States (or a combination both)?
Goal of the firm : 1. The goal of the firm should be
Explain the main purpose of a staffing management plan : Explain the main purpose of a staffing management plan. What tool should you use to graphically show total staffing needs for a project? What tool should you use to clarify roles and responsibilities for tasks
Identify the errors : Identify the errors in the following program segment. Determine the output displayed when the button is clicked:
What are the implications of christs humility for christians : What are the implications of Christ's humility for Christians? How should we implement Christ's example of humility in our personal relationships?
Incremental decision making : Incremental decision making occurs when managers make small decisions and move cautiously toward a bigger solution.
Briefly summarize the major sections : Create an introduction that tells what your report is about. Include the Problem Statement that you already created and revised in Part 1. Include terms that readers will need to know in order to understand the report.
How would you negotiate trade agreements : What are the implications of other nations acquiring a large amount of U.S. Treasury bills on the U.S. exchange rates? If China did this would it increase their military position in Asia

Reviews

Write a Review

 

Programming Languages Questions & Answers

  Write program to enter numeric values-arithmetic operator

Write a program that lets the user enter 2 numeric values, and an arithmetic operator: +, -, * and /. Write a switch statement that displays the result.

  Design and implement set of classes to model employees

Design and implement a set of classes to model the employees of a hospital: doctor, nurse, administrator, etc. Include methods in each class.

  Determine proper lower bound and upper bound on ?nal value

Determine the proper lower bound and upper bound on the ?nal value of the shared variable tally output by this concurrent program.

  Performance comparison- rsa versus aes

Exercise the idea that digital certificates are verified using a chain of trust. The trust anchor for the digital certificates is the Root Certificate Authority (CA)

  Explain how array simplifies program development

Describe the requirement for complex data structures and how they are utilized. Describe the design and application of arrays and how array simplifies program development.

  Create a serial sequence detector

You are to create a "Serial Sequence Detector". Your design will take in clock, reset, and one-bit data signal. Your design will check input data signal on rising edge of the input clock.

  Direction and magnitude be integers or doubles

Design the program consider Will the direction and magnitude be integers or doubles - will the input vectors be passed by value, by reference, or by const reference?

  Program a robot to run mile-long steeplechase

Program a robot to run mile-long steeplechase where steeples are made from beepers instead of wall segmesnts. the robot must jumb the steeples in this race by picking the beepers that make up the steeples.

  Develop program for concrete class in hierarchy

Develop program which reference objects of each concrete (non-abstract) class in hierarchy. Write down abstract method "display" which determines whether displayed shape is TwoDimensionalShape.

  Timer interrupt to coordinate peripherals on microcontroller

The timer interrupts to coordinate peripherals on the microcontroller. Use code from prior labs to drive the peripherals and will make minor modifications to use the interrupts.

  Program to calculate amount person would earn over a period

Write a program that calculates the amount a person would earn over a period of time if his or her salary is one penny the first day.

  Determining suitable parameters if pass-by-reference is used

Subprocedures in VBA utilize pass-by-reference. Which function or sub procedure alters its parameter?

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