Answer:
// here is code in java.
import java.util.*;
// class definition
class Main
{
// method that return total fare
public static double fare(double dis)
{
// calculate the total fare
double tot_fare=(4+((dis*1000)/140)*0.25);
return the fare
return tot_fare;
}
//driver method
public static void main (String[] args) throws java.lang.Exception
{
try{
// scanner object to read input string
Scanner s=new Scanner(System.in);
// variable
double dis;
System.out.print("please enter the distance in KM: ");
//read the number
dis=s.nextDouble();
// call the function with "dis" parameter
double ride_fare=fare(dis);
// print the total fare
System.out.println("total fare is: "+ride_fare);
}catch(Exception ex){
return;}
}
}
Explanation:
Read the distance from user with the help of scanner class.Call the function with parameter "dis".Here it will calculate the total fare as (4+((dis*1000)/140)*0.25). Here base fare is $4 and $0.25 for every 140 meter.Then function will return the total fare.
Output:
please enter the distance in KM: 7
total fare is: 16.5
The purpose of system software on a computer system is: B. to provide basic operational functionality by coordinating hardware components.
<h3>What is a software?</h3>
A software can be defined as a set of executable instructions that is typically used to instruct a computer system on how to perform a specific task (function) and proffer solutions to a particular problem.
<h3>The types of software.</h3>
Generally, there are three main types of software and these include the following:
- Application software
- Utility software
- System software
In Computer technology, a system software is the most important pre-installed software because it allows an end user to use the computer the first time he or she turns it on, especially by coordinating hardware components. Also, some examples of a system software include the following:
- Utilities.
- Search engines
- Stand-alone operating systems.
- Real-time operating systems.
Read more on system software here: brainly.com/question/1416480
#SPJ1