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

  Effective design features for site navigation

Screen shot of this example and explanation of effective design features will be included. Callouts are recommended. Ideally, students will locate examples of how they would like their site navigation to work and function.

  Program for saving account balance report

Savings account balance report from customer savings account file. Every input savings account record contains account number, balance forward, deposits (sum of all deposits).

  Simmac language programs

Write three programs in the machine language of the SIMMAC that will total the numbers stored in 20 different locations and place the result in a single location.

  Card generator program by linked list

Address Book-Card Generator Program Using a Linked List. This program will have names and addresses saved in a linked list. In addition, a birthday and anniversary date will be saved with each record.

  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.

  Program to input the assignment number

The program must prompt teacher to input the assignment number. Score for student for that assignment will be displayed.

  Design a website by using php and mysql to order pizza

Your task for this project is to design a website by using PHP and Mysqlto order pizza - A website with a complete catalog of pizzas with possible add-on options and customers should be able to prepare and customize an order as per their preference..

  Confi gure the repository and define the repository

Configure the repository and define the repository usernames and passwords - Install the subversion package.

  Approach for building site in-house with existing staff

Web site Consider your options for building the site in-house with existing staff, or outsourcing the entire operation. Decide which strategy you believe is in your company's best interest and create a brief presentation outlining your position.

  Create user friendly application-display name-button clicked

Create a user friendly application which can do the following: displays the name and address when button is clicked and permit user to choose a state, and when a user clicks a button.

  Smallest number using class-friend function and overloading

C++program which can neither be two integers or two floating point number and output smallest number using class, friend function and overloading.

  Develop two packages to accept information

Develop two packages, package1 comprises two classes manager and clerk.both classes having method to accept corresponding information.packages.

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