1. Create the Trail class. Your class will include an array of integers that will use...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Create the Trail class. Your class will include an array of integers that will use the following elevation values using the index as the marker. Trail Elevation (meters) Index 0 1 2 3 4 5 6 7 8 9 10 11 12 Elevation 100 150 105 120 90 80 50 75 75 70 80 90 100 Your Trail class must include a constructor that has two integer values start and end which will represent where you will start and end on the Trail. Your class must include two methods, The first method is TrailLevel will return true if the difference between the maximum and minimum elevation on the Trail is less than or equal to 10 meters. Your second method is Trail Difficult will return true If the Trail is determined to be difficult and false If not. To determine if the Trail is difficult you must track elevation changes that greater than or equal to 30 meters between two consecutive markers, A trail with 3 or more such changes is rated as difficult. FOR EXAMPLE: A trail segment starting at marker 7 and ending at marker 10 has a minimum elevation of 70 meters and maximum elevation of 80 meters. Since the difference between the minimum and maximum elevation is less than or equal then 10 meters, this trail segment is considered level and should return true. A trail segment starting at marker 2 and ending at marker 12 has a minimum elevation of 50 meters and a maximum elevation of 120 meters, Since the difference between the minimum and maximum elevation is greater than 10 meters, this trail segment is not considered level and should return false. 1. Create the Trail class. Your class will include an array of integers that will use the following elevation values using the index as the marker. Trail Elevation (meters) Index 0 1 2 3 4 5 6 7 8 9 10 11 12 Elevation 100 150 105 120 90 80 50 75 75 70 80 90 100 Your Trail class must include a constructor that has two integer values start and end which will represent where you will start and end on the Trail. Your class must include two methods, The first method is TrailLevel will return true if the difference between the maximum and minimum elevation on the Trail is less than or equal to 10 meters. Your second method is Trail Difficult will return true If the Trail is determined to be difficult and false If not. To determine if the Trail is difficult you must track elevation changes that greater than or equal to 30 meters between two consecutive markers, A trail with 3 or more such changes is rated as difficult. FOR EXAMPLE: A trail segment starting at marker 7 and ending at marker 10 has a minimum elevation of 70 meters and maximum elevation of 80 meters. Since the difference between the minimum and maximum elevation is less than or equal then 10 meters, this trail segment is considered level and should return true. A trail segment starting at marker 2 and ending at marker 12 has a minimum elevation of 50 meters and a maximum elevation of 120 meters, Since the difference between the minimum and maximum elevation is greater than 10 meters, this trail segment is not considered level and should return false.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these databases questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Python and most Python libraries are free to download or use, though many users use Python through a paid service. Paid services help IT organizations manage the risks associated with the use of...
-
1. Suppose that a particle moves along a straight line with acceleration a(t) =-6t+2 meters per second per second at time t seconds. Suppose that we fix the positive direction as motion to the right,...
-
Lakeside Slammers Inc. is a minor league baseball organization that has just completed its first season. You and three other investors organized the corporation; each put up $10,000 in cash for...
-
Solve the following equation. 2x 4 - 7x 2 + 5 = 0
-
In connection with his audit of the financial statements of Knutson Products Co., an assembler of home appliances, for the year ended May 31, 1999, Ray Mendez is reviewing with Knutson's controller...
-
Pleasant Stay Medical Inc. wishes to determine its product costs. Pleasant Stay offers a variety of medical procedures (operations) that are considered its products. The overhead has been separated...
-
List and describe 3 key macroeconomic factors ( gross domestic product, inflation, employment ) for firms to examine as part of their external analysis. Explain how macroeconomic factors influence...
-
The Chartered Financial Analyst (CFA) designation is the de facto professional certification for the financial industry. Employers encourage their prospective employees to complete the CFA exam....
-
Access the tableau dashboard hereLinks to an external site. to answer the next several questions. https://public.tableau.com/app/profile/asher.curtis/viz/ACCTG215DuPontSupplement/AccountingAnalytics...
-
Light electric transport such as electric bicycles (EB) are expected to be common means of short distance transportation in urban area. As the engineer of an EB firms you are tasked to come up with a...
-
The following T-accounts provide selected data about Blossom's financial results for the year. Sadly, several key components went missing after a thief broke into the Blossom accounting office: Beg....
-
Indigo Corporation was starting a new style of jacket and was monitoring the costs of its first production run of these items during the month. The costs and transactions associated with this jacket...
-
The 2020 comparative balance sheet and income statement of Perfect Supply Corp. follows: (Click the icon to view the comparative balance sheet.) (Click the icon to view the income statement.) Perfect...
-
Create a ipynb file called PandasA4credit.ipynb and complete the following. For this assignment load but DO NOT INSTALL NumPy and Pandas: run the following at the top of your script and then complete...
-
You get into an elevator at the ground floor and push the button to get to the top floor. You time the motion of the elevator and find that it takes about 3 seconds to get up to top speed, stays at...
-
A sample statistic will not change from sample to sample. Determine whether the statement is true or false. If it is false, rewrite it as a true statement.
-
Solve the linear programming model formulated in Problem 50 for Metro Food Services Company by using the computer. a. If Metro Food Services could hire another worker and increase its available...
-
For the demand data in Problem 11, develop a seasonally adjusted forecast for year 4. (Use a linear trend line model to develop a forecast estimate for year 4.) Which forecast model do you perceive...
-
In the Fast Shop Market example in this chapter, Alternative II was to add a new checkout counter at the market. This alternative was analyzed using the single-server model. Why was the...
-
Determine the displacement of point \(C\). The beam is made from A992 steel and has a moment of inertia of \(I=53.8 \mathrm{in}^{4}\). 8 kip A B -5 ft- -10 ft 5 ft-
-
Determine the slope at \(B\). The beam is made from A992 steel and has a moment of inertia of \(I=53.8 \mathrm{in}^{4}\). 8 kip A B -5 ft- 10 ft- -5 ft-
-
Determine the displacement at point \(D\). The A992 steel beam has a moment of inertia of \(I=125\left(10^{6} ight) \mathrm{mm}^{4}\). 18 kNm A 4m- D B3m 3m 41 4 m- 18 kNm
Study smarter with the SolutionInn App