Description of this paper

Write a java application that allows the user to read, display, sort, and search the city




Write a java application that allows the user to read, display, sort, and search the city (type String), and weather condition data (defined by the low temperature, high temperature and humidity, all integer types) for N cities in Australia. N should be declared as a constant and should be either equals to the largest digit of your student ID number or N=5 (if the highest digit of your student ID number is less than 5). The city name and weather condition data must be stored in separate single dimension arrays/arrayLists. This requires that your implementation must use parallel arrays (or arrayLists). If there are any uses of an array of records or structures/objects, it will be penalized under the heading ?Using techniques not covered in the course.? The ranges for these weather condition data should be are in -20? 20, 0? 60 and 10%? 100% respectively. These data must be entered from the keyboard and a validation for minimum and maximum values for each weather condition data variable must be done. In addition, the high temperature must be greater low temperature in the single set input for a city. Your application should display and execute a menu with the following options. A switch statement must be used to execute the following menu options.;1. Input data;2. Display;3. Sort by city;4. Sort by low temperature;5. Search;6. Display extreme temperature;7. Exit;The details for each option are described as below.;1. Input data;This option reads city name and weather condition data for N cities from the keyboard and stores them in separate single dimension arrays/arraylists. Figure 1 shows a sample input for a city. If the weather condition data entered exceed the ranges defined in the above paragraph, then an appropriate message should be displayed and the user should be asked to re-enter a new value.;2. Display;This option displays the city names and weather condition data stored in Arrays/ArrayLists for all cities, as shown in Figure 2.;3. Sort by city;When this option is selected, the city names are sorted in ascending order and this option also displays sorted cities with their weather condition data, as shown in Figure 3.You can use any sorting algorithm which uses at least two while loops and one if statement. A built-in sort should not be used.;4. Sort by low temperature;This option sorts the low temperatures in ascending order and display sorted low temperatures, city names and other weather condition data, as shown in Figure 4.;5. Search;When the ?Search? option is executed and the user enters a city name regardless of the lower case or upper case in the name spelling, the weather condition data of this city will be displayed as shown in Figure 5 (In this example, city name -Brisbane is entered). If the entered city name doesn?t match any existed one, it will show a warning message.;6. Display extreme temperature;If the user selects this option, the program will calculate and display the minimum value of low temperature, maximum value of high temperature as well as their corresponding cities, as shown in Figure 6.;7. Exit;Selecting ?Exit? option will exit the execution of the program.;Figure 1;Figure 2;Figure 3;Figure 4;Figure 5;Figure 6;Program design;You may use any design that meets the specification. However, a good design will adhere to the following guidelines;? be logically correct;? be easy to read and maintain;? be well-designed;? use UML class diagram;? use following methods and class;public class WeatherDataManager;public WeatherDataManager() //constructor;public void displayMenu();public void inputData();public void sortByCity();public void sortByLowTemp();public void search();public void displayExtremes();helper methods here;public static main(String [ ] args);Testing;Testing is important. You should;? list the different types of test cases.;? display the results of each test case.


Paper#70526 | Written in 18-Jul-2015

Price : $37