1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
WARRIOR [948]
3 years ago
8

A bike share program in Indianapolis allows customers to borrow a bike and charge them based on the length of their ride.

Computers and Technology
1 answer:
REY [17]3 years ago
4 0

Answer:

public static double calculate_fee(int lengthofRide, String membership){

       double fee = 0.0;

       if(membership.equalsIgnoreCase("daily")){

           fee = 1.50 +(lengthofRide*20);

       }

       else if (membership.equalsIgnoreCase("annually")){

           fee = 1.0+(lengthofRide*15);

       }

       return fee;

   }

Explanation:

The solution is implemented in Java. The complete code prompting the user to enter ride duration and membership type is given below:

import java.util.Scanner;

public class num4 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter your membership \"daily\" of \"annually\"");

       String membership = in.nextLine();

       System.out.println("Enter your ride duration in minutes");

       int rideTime = in.nextInt();

       //calling the method calculate_fee

       System.out.println("Your total fee based on your membership is "+calculate_fee(rideTime,membership));

   }

   public static double calculate_fee(int lengthofRide, String membership){

       double fee = 0.0;

       if(membership.equalsIgnoreCase("daily")){

           fee = 1.50 +(lengthofRide*20);

       }

       else if (membership.equalsIgnoreCase("annually")){

           fee = 1.0+(lengthofRide*15);

       }

       return fee;

   }

}

You might be interested in
Explain different users of computer in briefly?​
goldfiish [28.3K]

Answer:

The question is invalid; there are many types of computer user. Why on earth do you think there are five?

From the top of my head.

Casual- someone at home browsing the web, reading email.

IT Consultant. Advising people.

Software developer- writing software

Secretary - manages email for a company

Academic. Writing research papers.

Monitors. Monitor a computer system.

That’s six off the top of my head. There are probably a dozen more. So why do you think there are five?

3 0
2 years ago
If you use the assign software to a user option, how does the new software install to the user's computer? 70-411
Serggg [28]
Hi,

If you install a new software and you select option for all users the software will be installed in a special folder that is shared by all the users and each user would represent a subfolder in the shared folder.

Hope this helps.
r3t40
3 0
2 years ago
What should be included in research for a problem statement? Select all that apply
Burka [1]

Answer:

I think the answer is C and D

7 0
3 years ago
Read 2 more answers
Need help asap please
Bumek [7]

Answer:

options is right

Explanation:

3 0
2 years ago
An operating system coordinations the___ of a computers operation
qwelly [4]
\\\\\\\\\\\\\\\\\\\\\\\\\Operating system///////////////////////
                            Is the Answer
8 0
3 years ago
Other questions:
  • E-fit and similar software compares what?
    7·1 answer
  • Which one of the following statements is true regarding the fetch-execute cycle? Each step of the fetch-execute cycle is perform
    15·1 answer
  • 1. Some of the music in the 1960s was used to protest social and political issues. Is music still used as a form of protest? Why
    13·1 answer
  • What are the different nail disorders?
    13·1 answer
  • Which option should you select to accept a tracked change? A. Accept B. Reject C. Review D. Delete
    8·2 answers
  • Search engines enable you to
    12·1 answer
  • What type of version of visual studio is the visual studio express
    8·1 answer
  • What Is entered into the system as input?
    13·1 answer
  • Complete the statement below using the correct term.<br>Website managers use<br>every day​
    11·2 answers
  • Select the correct answer.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!