Write the code to open the file and copy the raw data

Assignment Help Visual Basic Programming
Reference no: EM131071018

Assignment

Objectives

This assignment will provide practice and experience in:

• Designing an application - Topic 02
• Developing applications - Topic 02
• Variables and constants - Topic 03
• Decisions and conditions - Topic 04
• Modularisation - Topic 05
• Arrays and structures - Topic 08
• File handling - Topic 10

NB Depending on when you start this assignment you may need to read ahead especially on how to use files.

Suggestions:

Read the assignment specifications carefully first. In Week 2 start making notes on what is required. By Week 3 you should be ready to make the first version of the program based on your screen design. Week 5 consider what parts of your code should be modularised. By Week 8 you should be able to implement the arrays. By Week 10 implement file handling. Finalise the program in Week 11.

Background

Data provided by third parties is often not in an immediately useful format. Sometimes due to the quantity and/or complexity of the data it is better to write a program to process it rather than using a spreadsheet or word processor. For this exercise we will be using weather data from the Australian Bureau of Meteorology but note that the skills that you develop in this exercise can be applied to any similar problem, e.g. currency fluctuations, ocean temperatures over time, university admission data and so on.

You are required to write a program that will calculate the average rainfall and wind speed for a single day using weather data downloaded from the Australian Bureau of Meteorology. The data file can be downloaded from https://www.bom.gov.au/nsw/observations/nswall.shtml or alternatively you can use the one uploaded with this document. Select any single town, e.g. Ballina and scroll to the bottom of the page and click the link which will look similar to that below:

25/01:00pm 31.4 34.2 24.3 66 5.0

Other formats:

Comma delimited format used in spreadsheet applications

https://www.bom.gov.au/fwo/IDN60801/IDN60801.94596.axf

This file should be saved to your bin/debug folder and submitted along with the rest of your assignment. You may choose your own location and date to download, e.g. I chose Ballina and 23rd January.

Specifications

You are required to design and write a VB Windows application using Visual Studio 2013 to display data and to extract average wind speed and rainfall from a downloaded data file. Your program must:

• use a common dialog control for loading and saving data;
• have at least one general procedure;
• must demonstrate the use of an array;
• must use at least one try catch;
• You must use the data file as downloaded from the Internet. You are not allowed to modify the data in the data file before using it in your application;
• Your program must display the data in the file;
• Your program must display the average wind speed and the average rainfall;
• Your program must save the modified data (see step 4 below) to a new file.

The program does not have to be fully completed to earn marks but your submission must be satisfactory and a reasonable attempt. See the general instructions in mySCU/Assignments/Marking Criteria for clarification of satisfactory and reasonable. If you have any queries about the assignment please use the discussion board.

The marks will be allocated as follows:

• Design 30% (Sketch, Plan of objects and properties, Plan of event procedures)

• Style 30% (See style guidelines)

• Functionality 40% (as per specifications)

Advice and hints

I suggest that you develop your application using the following steps:

1) Write the code to open the file and copy the ‘raw' data from the file into a ListBox.

2) Write the code to save the data in the ListBox to a new file.

3) Write the code to remove unwanted data so that you just have the lines of data we are interested in. Keep using the ListBox so that you can know you have got it right. The first item in your ListBox should be something like: 0,94596,"Ballina","IDN60801","23/02:00pm","20150123140000","20150123030000"... You will need to study the raw data file carefully to decide how to remove the unwanted

data. I suggest loading it into Word so that you can see how the file is formatted, i.e. where the line breaks are. Click this icon in Word to see the line break character:

1375_Formating Symboles.jpg

Show or hide formatting symbols

4) Process each line of data so that each data item is stored in a separate memory location, i.e. you could use variables, an array or an array of structs. Note that in the original data file the first line following [DATA] identifies what each data item is, i.e.

sort_order

wmo

name[80]

history_product[80]

local_date_time[80]

local_date_time_full[80]

aifstime_utc[80]

0

94596

"Ballina"

"IDN60801"

"23/02:00pm"

"20150123140000"

"20150123030000"

You will also need to remove double quotes. One way to do this is to process the string one character at a time skipping over the double quotes and building a new string. At this stage you should be able to display something like 0,94596,Ballina,IDN60801,23/02:00pm,20150123140000,20150123030000...

5) Now you need to assign the individual data items to variables or to an array. One way is to use the split method.

6) The rainfall data is rain_trace[80] and the wind speed is wind_spd_kmh. Once you have isolated these values it should be reasonably straightforward to calculate the average rainfall and windspeed.

7) Finally make use of the discussion board and internal workshops to clarify any aspect of this assignment.

Reference no: EM131071018

Questions Cloud

Connection head executive : Appropriate preparing is one of the fundamental devices in keeping up a fruitful OHS program. Without preparing, all the business' approaches and techniques are just words in composing.
Determine whether or not you believe the notion : Determine whether or not you believe the notion that an officer or investigator's first questions at the scene should be, "Where's the phone? Can we get access to the phone?" Provide a rationale for your determination.
What is the NPV and accounting break-even level of sales : Modern Artifacts can produce keepsakes that will be sold for $80 each. Nondepreciation fixed costs are $2,800 per year, and variable costs are $40 per unit. What is the accounting break-even level of sales if the firm pays no taxes? What is the NPV b..
Constructed a multi-storied building consisting : Dr. Bankey Lal, a businessman, constructed a multi-storied building consisting 16 flats of equal size. The construction was started in April 2004 and completed on March 31, 2008.
Write the code to open the file and copy the raw data : Write the code to open the file and copy the ‘raw' data from the file into a ListBox. Write the code to save the data in the ListBox to a new file.
What should be done about the various incidents : Your boss asks what you think about all of these strange incidents. Respond and be sure to provide a recommendation on what should be done about the various incidents.
Performance of managerial functions : Outline the order in which managers in an organization employ in the performance of their managerial functions.
Holistic understanding of conducting business in a culture : "Doing business in a cultural insight presentation which requires you to share your empathetic and holistic understanding of conducting business in a culture other than your own.
Construct an interest rate tree according to the method : Construct an interest rate tree according to the method presented in class with step size h = 0.5, volatility ? = 0.2, drift m = 0.1, and initial 0.5-year rate r = 8%. The tree should give short rates out to time 0.5. What is the time 0 price of $1 p..

Reviews

Write a Review

Visual Basic Programming Questions & Answers

  Airplane seating chart

Airplane Seating Chart An airplane has 15 rows (numbered 1 through 15), with six seats (labeled A, B, C, D, E, and F) in each row. Write a multiform program that keeps track of the seats that have been reserved and the type of meal requested by ea..

  Vb.net program with a graphical user interface.

Write the program in VB.NET (not Web based) with a graphical user interface.

  Calculate and display a customer''s cable bill

The Calculate Total Due button's Click event procedure should calculate and display a customer's cable bill. The cable rates are shown below. Business customers must have at least one connection. The form's FormClosing event procedure should verif..

  A small airline has just purchased a computer for its new

a small airline has just purchased a computer for its new automated reservations system. youve been asked to develop

  Remove minimize, maximize, and close buttons from the title

Perform the appropriate steps to create a connection to the sample database. Be sure to select the option to copy the database to your project so it will be automatically included in the project.

  Gas pump - compute the total cost from the number of gallons

Write a program that will help an elementary school student learn multiplication and compute the total cost from the number of gallons entered and the selected grade.

  Write a program using dynamic arrays

Write a program using dynamic arrays to record the high temperatures of last seven days and to display all of them with the average of high temperatures.

  An analysis of a group of weight measurements

An analysis of a group of weight measurements involves converting a weight value into an integer category number that is determined as follows

  Change the color of the text in the redlabel to red

Write that visual basic instruction to change the color of the text in the redlabel to red.

  Describe the appeal of html 5 in page and site design.

What influence if any will the new markup language have on organizations as they look to rebuild or create their web presence?

  Name the project and set the title of your form

Perform the appropriate steps to display the detail view of the fields on your form.

  Need help building a vwd website this website may not go

need help building a vwd website. this website may not go live. i have little progress as a family tragedy has impeded

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