Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Background: You are working for the Ministry of Transportation in Ontario. You are asked to create a program that checks people's eligibility to take road

image text in transcribed
Background: You are working for the Ministry of Transportation in Ontario. You are asked to create a program that checks people's eligibility to take road tests. To be allowed to take a " G* class road test, the person must: - have a "G2" license for at least 24 months To be allowed to take a "G2" class road test, the person must: - have a "G1" license for at least 12 months This challenge has 2 parts: Part 1 Elibility Check Write a function iseligile that determines someone's eligbility to take a road test for a given class following the criteria described in the scenario. Your funetion should: 1. Receive 3 arquments: - current_ctass : a String value with current driving class - time : a integer value representing the number of months the person has held their current class - test_class : a String value with the road test class they want to test their eligibility for 2. Check using the current_class and time matches the criteria of the test_class to be eligible. 3. Returns a Boolean value - True : if eligible - Fatse if not eligible 4. Your solution MUST employ the "flag" technique to determine the eligibility. Alse, please provide 5 extra test cases like the ones shown

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions