Your program must convert this data into a set of objects: one object per country and state. States should be contained by their countries. Countries could be stored in a vector of country objects in the app itself. Another way is to create an instance of the same class you use for countries and states, call it global, and have it store all the countries. The app would then contain the single global object as a property. This option would create a 3-level hierarchy: the global object stores data for the entire world and a vector of country objects, while the objects of countries that have states in the database would store their corresponding states. Again, you can use the same class definition for all three kinds of objects because they store essentially the same kind of data. The graphical user interface of your program must contain a number of widgets: - A single area where you plot the data. The title of the plot should be informative displaying what country/state is being shown and also indicating the relevant options that were used to generate the plot. (See below.) The x labels should be dates. You need to implement different \( y \) scales for the two plots on the left and right as shown below. - A list box showing all available countries. The first element should be called "Global" and selecting it should plot the global data. This is not contained in the database, so you will need to compute it. - Another list box showing all states of the currently selected country. The first option should be "All." As most countries do not have states, regions, territories or provinces associated with them in the database, this will be the only option for them. Selecting it should show the data for the country itself. There are two kinds of countries with states in the database. Australia, Canada, China and the United States have all their states, provinces, etc. listed. Other countries such as the UK, the Netherlands or Denmark are not subdivided, but they have a number of overseas territories listed. For example, the UK is not broken down to England, Scotland, Wales and Northern Ireland, but it has additional territories, such as the Falkland Islands, listed. - A widget to select the number of days used for computing a moving average of the data (from 1 to 15). Make sure that the selection is an integer. Selecting 1 means no averaging. Note that the moving average should use the past \( \mathrm{N}-1 \) days and the current day, where \( \mathrm{N} \) is the number of days selected. - A widget to select what to plot: cases, deaths, or both. - A widget to select whether to plot cumulative data or daily numbers. The database contains cumulative data. You must compute the daily data taking care of potential data errors. Specifically, make sure that you do not plot negative values ever. Anytime any of the GUI widgets change, the plot and its title should be immediately updated.
Added by Karen F.
Close
Step 1
This class will contain properties such as the name of the country or state, the data associated with it, and a list of states if it is a country. ```matlab classdef Location properties Name Data States end methods Show more…
Show all steps
Your feedback will help us improve your experience
Ajiboye Tunde and 67 other Discrete Mathematics educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Recommended Videos
Question 1 (1 point) Your task in this assignment is to use polynomial functions to design a rollercoaster. To express your rollercoaster design you will create a piecewise function out of the polynomial functions. Your rollercoaster must meet certain criteria, and the questions below will guide you through this process. In the end, you will submit a written assignment, showing all of your calculations and ideas, to the dropbox. You may find it very useful to utilize graphing technology, such as Graph, to help you with this assignment. Question 2 (1 point) Research a favourite, or a famous, rollercoaster. Write a short summary (2-3 paragraphs) of this coaster’s general information; include its name, a picture, where it is located, when it was built, why you picked it and its physical characteristics. Make sure you note the height of the initial drop as the initial drop of the rollercoaster you will be designing in this assignment will model the initial drop of this rollercoaster you have researched. Also remember to cite your sources (1-2 sources). Question 3 (1 point) It may be useful now to do a little bit of research on the physics of rollercoasters. You will not need to do any physics-style calculations in this assignment, but you will be expected to abide by the common rules. For example; a rollercoaster cannot be expected to defy gravity, it must be given momentum at the beginning of the track, and cannot reach as high a height at the end of its track as it can at the beginning. Write a short paragraph describing what you found and cite your sources (1-2 sources) . Question 4 (1 point) Now it is time to create your own rollercoaster. Using the idea of piecewise functions, create an appropriate scale on your axes and design a rollercoaster, using technology like Graph. Your rollercoaster must have the features listed below. You should try to make each of the polynomial functions flow into one another to create a smooth ride for your passengers. To prevent your functions from overlapping, make sure to restrict the domain of the function. Set each polynomial function to a different colour and submit a picture (or a screen capture) of your design, as well as the piecewise function notation that models it. For each of the pieces in your design: a) Uses at least four different polynomial functions, pieced together. b) Models the initial drop of the rollercoaster you researched. c) Has at least 4 other drops. d) Goes through an underground tunnel at least once (assuming y = 0 is the ground) e) Any other features you feel would add to the ride and can be modelled with a polynomial function. Question 5 (1 point) For each of the pieces in your design: a) State the equation for the polynomial function used. b) Determine the degree of the function. c) State the domain and range of the restricted function. d) Determine if each unrestricted function pieces have even or odd symmetry, or neither. If neither, determine which transformations, if any, could be applied to make it even or odd over its unrestricted domain? Suppose you were asked to take the first three pieces of your rollercoaster and model them with a single function. Answer the following questions: a) If you represent these three pieces with a single function, what degree do you think this function will be? Justify your reasoning. b) Determine an equation for this function. c) Graph the equation you created together with the first three functions. How similar is it? If there are any differences, why do you believe that is?
Umar Sohail Q.
Activity 2. Incomplete Directions: Read and analyze the given situations. Write your answers on a separate sheet. A. Carmen kept a tally of the number of calls she received each day for a week. Plot the missing point by using the data in the table and connect the points to complete the line graph below. Calls Carmen received Day | Calls Monday | 3 Tuesday | 0 Wednesday | 6 Thursday | 7 Friday | 10 B. A junior high school student counted the number of bricks in each fence in his neighborhood. Draw the missing bar by using the data in the table to complete the histogram below. Bricks per fence Number of bricks | Number of fences 0-19 | 3 20-39 | 2 40-59 | 4 60-79 | 1 80-99 | 3 C. The owner of an orchard measures the height of every tree in centimeters (cm). Plot the missing point by using the data in the table and connect the points to complete the ogive below. Height of the tree (cm) | Frequency | Cumulative Frequency | Cumulative Percentage 1-50 | 5 | 5 | 5% 51-100 | 30 | 35 | 32% 101-150 | 25 | 60 | 55% 151-200 | 50 | 110 | 100%
Jerelyn N.
A corporation that operates five suppliers of athletic apparel in a region provides merchandise for a shoe company. The shoe company recently sought information from the five plants. One variable for which data were collected was the total money (in dollars) the company spent on medical support for its employees in the first three months of the year. Data on the number of employees at the plants are also shown below. Complete parts a and b. Data: Medical Employees $7,773 125 $14,808 404 $12,392 253 $6,708 105 $3,532 70 a. Compute the weighted mean medical payments for these five plants using the numbers of employees as the weights. The weighted mean is (Round to the nearest dollar as needed.) b. Explain why the shoe company would desire that a weighted average be computed in this situation rather than a simple numeric average. Choose one: A. The weighted average takes into account the variation in the data instead of only providing a measure of central tendency. B. The weighted average takes into account the numbers of employees and finds the average payment per employee instead of the average payment per plant. C. The weighted average takes into account the numbers of employees and is a more reasonable measure of the average payments than would be an unweighted average. D. The weighted average takes into account both the mean and the median of the data, instead of only providing the simpler measure of only the mean. Suppose there is an investigation to determine whether the increased availability of generic drugs, Internet drug purchases, and cost controls have reduced out-of-pocket drug expenses. As a part of the investigation, a random sample of 196 privately insured adults with incomes above 200% of the poverty level was taken, and their 2015 out-of-pocket medical expenses for prescription drugs were collected, with the accompanying results. Complete parts a through d below. Data: Out-of-pocket drug expenses: 194.41 136.96 162.24 176.32 200.17 119.67 143.12 207.93 203.87 133.41 130.58 210.51 190.33 122.18 136.56 156.45 157.67 159.04 164.71 208.16 168.37 212.32 107.39 133.32 159.02 192.13 182.53 214.17 174.39 178.02 128.79 189.64 176.45 183.48 202.75 200.58 130.76 146.03 158.67 167.53 165.36 187.54 157.71 164.54 188.46 167.79 156.16 165.08 107.41 147.31 196.23 195.64 148.38 91.23 177.58 176.62 183.72 112.44 168.95 199.48 195.76 211.33 182.66 157.94 207.39 174.48 168.66 163.37 140.25 177.92 175.43 160.58 176.22 164.44 182.13 187.58 150.24 153.33 166.99 186.74 154.48 167.52 174.61 196.28 168.19 214.84 173.71 177.07 130.51 153.72 164.03 95.74 142.49 146.62 139.51 146.15 127.06 170.59 128.97 147.54 183.87 177.13 241.82 202.58 195.15 199.04 206.04 170.04 140.18 205.94 130.19 176.93 184.91 184.88 79.59 177.91 225.58 157.68 141.13 159.35 165.54 194.64 166.51 96.99 173.94 152.84 182.29 220.51 169.72 110.62 113.24 154.11 174.16 166.29 187.12 188.31 155.55 154.63 121.82 158.55 222.46 166.56 170.06 175.02 177.94 182.64 182.44 147.89 147.78 205.43 152.77 160.53 161.71 203.91 161.16 113.97 153.52 189.55 134.75 141.89 175.57 180.14 168.85 153.63 184.32 218.86 172.28 168.43 199.88 175.48 177.67 132.45 125.91 163.79 107.55 174.03 157.84 178.81 196.84 184.04 144.13 150.19 134.11 209.53 173.05 160.83 115.11 168.77 167.14 173.99 181.75 139.87 163.56 206.95 202.45 201.77 a. Calculate the mean and median for the sample data. The mean is (Type an integer or decimal rounded to the nearest cent as needed.) The median is (Type an integer or decimal rounded to the nearest cent as needed.) b. Calculate the range, variance, standard deviation, and interquartile range for the sample data. The range is (Type an integer or decimal rounded to the nearest cent as needed.) The variance is (Type an integer or decimal rounded to two decimal places as needed.) The standard deviation is (Type an integer or decimal rounded to the nearest cent as needed.) The interquartile range is (Type an integer or decimal rounded to the nearest cent as needed.) d. Write a short report that describes out-of-pocket drug expenses for privately insured adults whose incomes are greater than 200% of the poverty level. Choose the correct answer below. A. Out-of-pocket drug expenses are well described by the mean and the standard deviation as there are no outliers. B. Most adults' out-of-pocket drug expenses are close to the median, but there is at least one outlier that creates a large range. C. Out-of-pocket drug expenses are well described by the mean and the standard deviation as the distribution of data is not roughly symmetrical. D. Nearly all adults' out-of-pocket drug expenses are within the interquartile range.
Sri K.
Recommended Textbooks
Discrete Mathematics and its Applications
Higher Level Mathematics
Discrete Mathematics
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD