Question: package Lab 2 ; / * * * This class and its method is designed to * help students practice automated testing * @author Marzieh
package Lab;
This class and its method is designed to
help students practice "automated testing"
@author Marzieh Ahmadzadeh
public class TestingExample
This method calculates the number of points a driver gets based on how far they have gone over the maximum allowed speed.
@param actualSpeed This parameter shows the current speed of the car that is caught by camerapolice
@param maxSpeed This parameter shows the maximum allowed speed in an area.
@param stuntDriving This parameter is true if a driver is caught in stunt driving.
@return
public static int LicencePointsint actualSpeed, int maxSpeed, boolean stuntDriving
int points ;
if actualSpeed maxSpeed return ;
else if actualSpeed maxSpeed return ;
else if stuntDriving actualSpeed maxSpeed points ;
else if actualSpeed maxSpeed && actualSpeed maxSpeed points ;
else if actualSpeed maxSpeed && actualSpeed maxSpeed points ;
return points;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
