subject
Computers and Technology, 04.11.2021 14:00 Kana81

This Question is an actual FRQ from a past exam. A. Make all the necessary modifications
B. Submit the .java file

//This question involves analyzing simulated flights a traveler might take to determine the number of points the traveler can earn.
//Travelers earn points based on the number of miles traveled.
//The points can be used for special services.
//The number of miles traveled on each simulated flight is obtained by calling the milesTraveled method in the following AirTravel class.
//You will write the methods in the class including the main method. (This part would NOT appear on the AP exam)

public class AirTravel
{

// Returns the number of miles traveled in a simulated flight.
// Assume the value returned is greater than 0.

public static int milesTraveled()
{ /* implementation not shown */ }

/** Returns the total number of points earned for numFlights flights,
* as described in part (A)
* Precondition: 0 < numFlights
*/

public static int totalPointsEarned(int numFlights)
{ /* to be implemented in part (A) */ }

// There may be variables and methods that are not shown.
}

// TASK

// (A) Write the totalPointsEarned method, which returns the total number of points earned for numFlights simulated flights.

// Miles for each simulated flight are retrieved by calling the milesTraveled method,
// which returns the number of miles traveled in one flight.
// After the miles for all of the flights have been accumulated, points are awarded
// according to the following rules:

// For the first 1,000 miles traveled, 1 point is earned per mile.
// For additional miles traveled up to 10,000 miles, 2 points are earned per mile.
// For additional miles traveled beyond 10,000 miles, 5 points are earned per mile.

// For example, for a total of 12,000 miles, a traveler earns 1,000 points for the
// first 1,000 miles, plus 2 × 9,000 points for miles 1,001 to 10,000, plus
// 5 × 2,000 points for miles 10,001 to 12,000.
// Therefore, the total number of points earned is 1,000+(2×9,000)+(5×2,000)=29,000
//

// Complete method totalPointsEarned.

// Returns the total number of points earned for numFlights flights, as described in part (A)

// Precondition: 0 < numFlights (a precondition is a condition that must be true for your method code to work)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
question
Computers and Technology, 24.06.2019 01:00
Me if you do then you get 10 points and brainliest
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Auniform resource locator (url) is a formatted string of text that web browsers, email applications, and other software programs use to identify a particular resource on the internet. true false
Answers: 2
question
Computers and Technology, 24.06.2019 09:10
  to change the number of rows and columns displayed by the excel object a. select the object and drag a size handle on the active object. b. deselect the object and drag a size handle of the object. c. deselect the object and drag a row or column divider of the object. d. select the object and drag a row or column divider on the active object.
Answers: 2
You know the right answer?
This Question is an actual FRQ from a past exam. A. Make all the necessary modifications
B....
Questions
question
Computers and Technology, 14.09.2019 06:30
Questions on the website: 13722367