Computer Science > Research Paper > McMaster UniversityENG TECH 1CP3Assignment 3 Solutions : C-Strings, File I/O, Data Structures (All)
Assignment 3 Part 1: //Ocean wave measurement and analysis is important in Tsunami warning systems. //Wave steepness is the ratio of wave height (WH) to wave length (WL) and is an //indicator of w ... ave stability. When wave steepness exceeds a 1/7 ratio the wave //becomes unstable and begins to break. //A file called wavedata.dat contains data for ocean waves. Each line in the data file //contains time and wave height measurements as follows: //year, month, day, hour, minute, wave height (metres), wave length (metres) //The values are separated by one or more space characters. //Create a program that will create a structure to store one record of wave data. Create a //single-dimensional array of structures to store all wave data. There will be a //maximum of 50 records in a data file, but there could be fewer than 50 records. Make //sure your program can accommodate an unknown number of records, to a maximum //of 50 records. //The program will read the wave data, storing one record in each structure in the //single-dimensional array. After reading the data and storing all data in the array, //perform the following: //Output to a file the data for all waves that exceed the 1/7 steepness ratio. Include the //steepness ratio for each wave in the output. //Output to the console the average steepness for each year (2010 – 2012), and the data //for the steepest wave for each #include <iostream> #include <iomanip> #include <cctype> [Show More]
Last updated: 3 years ago
Preview 1 out of 7 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Jun 15, 2021
Number of pages
7
Written in
All
This document has been written for:
Uploaded
Jun 15, 2021
Downloads
0
Views
78
Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·