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
Which best describes obliteration in a forged document?
Drupady [299]
The answer is B bc obliteration is related to covering the document
4 0
3 years ago
The process of converting information, such as text, numbers, photos, or music, into digital data that can be manipulated by ele
SCORPION-xisa [38]

Answer:

The process of converting information, such as text, numbers, photos, or music, into digital data that can be manipulated by electronic devices is called Digitization

Explanation:

It is the process of converting “information in to a digital form”. Here the information are organized into bits. Mostly these data will be converted into the form of image. But these can be edited by converting once again into necessary format and even back to image too. There are specific tools which the user needs to install for editing the digital documents.

The reason why we need digitization is that

a) We want to convert hard copy into soft copy and store it in system.  

b) We would like to edit the data in the hard copy and preserve as a fresh copy.

4 0
3 years ago
Write a Java test program, named TestGuitar, to create 3different Guitars representing each representing a unique test case and
alina1380 [7]

Answer:

Explanation:

//Guitar.java

import java.awt.Color;

import java.lang.reflect.Field;

import java.util.Random;

public class Guitar

     /**

     * these two fields are used to generate random note and duration

     */

     static char[] validNotes = 'A', 'B', 'C', 'D', 'E', 'F', 'G' ;

     static double[] validDuration = 0.25, 0.5, 1, 2, 4 ;

     /**

     * basic guitar attributes

     */

     private int numStrings;

     private double guitarLength;

     private String guitarManufacturer;

     private Color guitarColor;

     public Guitar()

           /**

           * default constructor

           */

           numStrings = 6;

           guitarLength = 28.2;

           guitarManufacturer = Gibson;

           guitarColor = Color.RED;

     

     public Guitar(int numStrings, double guitarLength,

                 String guitarManufacturer, Color guitarColor)

           /**

           * parameterized constructor

           */

           this.numStrings = numStrings;

           this.guitarLength = guitarLength;

           this.guitarManufacturer = guitarManufacturer;

           this.guitarColor = guitarColor;

     

     /**

     * required getters and setters

     */

     public static char[] getValidNotes()

           return validNotes;

     public static void setValidNotes(char[] validNotes)

           Guitar.validNotes = validNotes;      

     public static double[] getValidDuration()

           return validDuration;

     public

4 0
3 years ago
WILL GIVE BRAINLIEST TO HELPFUL ANSWERS!
sashaice [31]

Algorithm is part of computer science. You an learn it on Khan academy. (you probably werent looking for this but no one was answering)

7 0
3 years ago
Worksheet cells can only be moved one at a time.
Vadim26 [7]
If the question is true or false, it is <u>false</u>. Also assuming you are referring to Excel or similar spreadsheet programs.
4 0
3 years ago
Other questions:
  • Circular error are caused by adding the cell name of a/an cell to aformula
    7·1 answer
  • What are two major techniques involved in green computing
    14·1 answer
  • Find the inverse function of f(x)= 1+squareroot of 1+2x
    6·1 answer
  • How much does a dodge tomohawk cost for a used one?
    7·1 answer
  • Fill in the blanks to make the factorial function return the factorial of n. Then, print the first 10 factorials (from 0 to 9) w
    6·1 answer
  • Convert 128 GB into KB​
    8·2 answers
  • Does anyone know any good new online multiplayer console games that are either out or coming out soon.
    7·1 answer
  • Derive the three-dimensional transformation matrix for scaling an object by a scaling factor s in a direction defined by the dir
    15·1 answer
  • Which of the following is the most significant result of technological innovation?
    10·2 answers
  • Write a method that makes the input string of sentences ending with and
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!