Using pseudocode only, create the logic for an application that is designed to a
ID: 3548288 • Letter: U
Question
Using pseudocode only, create the logic for an application that is designed to assist a meteorologist with data collection. Here are the specifications that are given to you:
1.The application will accept exactly 5000 locations, times, and temperature readings.
2.The application will save the data to a text file.
3.The application will calculate an average reading using a separate method.
4.The application will display the average using a separate method.
5.The application will use a separate method to display a table of all readings (include the location, time, and temperature reading) of all temperature readings over a degree level that the user can configure. In other words, if the user sets the level to 65 degrees, the program will display a table of all of the temperature readings over 65 degrees.
Unfortunately, the meteorologist who gave you this task went out on sick leave and will not be back before your the date that your contract specifies that the program is to be developed, tested, and made ready for production. Therefore, you must use your best judgment as to any decisions that must be made regarding the program's design.
You will not be the person who will be maintaining the program, so you must make the code as simple as possible while maintaining its functionality. The code must be properly indented with appropriate code comments. The program must include a user friendly dialog so that the meteorologist can operate it with minimal instruction. The program must also exhibit all of the programming principles we have covered this term.
This will use arrays, output one group at a time, average in seperate methods, and ALLOW THE USER TO SELECT A TEMPERATURE, THEN ONLY OUTPUT THOSE READINGS ABOVE THE USER'S SETTINGS.
Explanation / Answer
I will write the pseudocode in accordance with the specification.
For 1st specification, now on numbered as 1, 2, 3 and so on.
1. It will be easier to take three arrays of size 5000, for location, times and temperatures.
2. save the input to text file, its easy to create a file in any language that u will use.
3. create a separate method, say average(), and in that method calculate the average reading by summing up the values in array for temperature and then divide the sum by 5000.
4. create a method display. call average() method from this display method.
5. create a method, say take_input(), it will take temperature as input so as to display the details for temperature, location and times for the temperature above the supplied one. Now create a method, say display_table(), it will call the take_input() method, and then it will compare every value of temperature array with the supplied value of temperature. If the value of temperature will be greater than 65, say for example, then it will display the corresponding location, times and temperature.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.