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

  Software system to manage records of patients

A software system is to be developed to manage the records of patients who enter a clinic for treatment. The records include records of the all regular patient monitoring.

  Program to display employees-total hours in decreasing order

The following array stores work hours for eight employees, write program which display employees and their total hours in decreasing order of total hours.

  Write a function called stream-map

Write a function that produces a stream of positive prime numbers . Use that stream to create a list of the product of all pairs of consecutive prime numbers up to a given value.

  Using the irvine32 library functions

Create 32 random points which have (x, y) co-ordinates

  Program to accept mass-density and compute volume

Write down the program which accepts as input the mass (in grames) and density (in grams per cubic centimeters), and output volume of the object.

  Choose one 1 of the working groups in the ietf or ieee and

write a three to four 3-4 page paper in which youquestion 1. select one 1 of the working groups in the ietf or

  Write program using ias instruction set

Form the array C such that C(I)=A(I)+B(I) for I=1,2,...,1000. using IAS instruction set, write down program for this problem with assembly.

  Write program to compute the volume flow rate

Write program to compute volume flow rate in cubic feet per second of water flowing through pipe of diameter d in inches and a velocity of v feet per second.

  Explain fundamentals types of scalar-array and hash in perl

Later versions of perl moved beyond fundamentals types of scalar, array, and hash and introduced a reference type. Write down the Perl subroutine, referenceTypeExample.

  What is a data flow diagram

Define what is meant by a process in a process model. How should a process be named? What information about a process should be stored in the CASE repository?

  In the article thoughts on language design 2007 steele

in the article thoughts on language design 2007 steele suggests that structured programming techniques may not be

  Design psuedocode program to calculate amount

Design a psuedocode program that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day.

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