Find Jobs
Hire Freelancers

a c++ program

$10-30 USD

Completed
Posted over 7 years ago

$10-30 USD

Paid on delivery
A minivan has two sliding doors. Each door can be opened by either a dashboard switch, its inside handle, or its outside handle. If the child lock switch is activated, no doors will open independent of what switches are activated. In order for the sliding doors to open, the gear shift must be in park, and the master unlock switch must be activated. Your task is to simulate a portion of the control software for the vehicle. The input is a sequence of values for the switches and the gear shift, in the following order: Dashboard switches for left and right sliding door, child lock, and master unlock (0 for off or 1 for activated) Inside and outside handles on the left and right sliding doors (0 or 1) The gear shift setting (one of P N D 1 2 3 R). IMPLEMENTATION: Print “left door opens “and/or “right door opens” as appropriate. If neither door opens, print “both doors stay closed”. Allow user the choice to continue (select another set of options) as long or he/she wishes. SAMPLE INPUT: 0 0 0 1 0 1 0 0 P Dashboard switch on the left door Dashboard switch on the right door Child lock Master unlock Inside left door latch Outside left door latch Inside right door latch Outside right door latch Gearshift (P N D 1 2 3 R) SAMPLE RUN: Please enter DL DR CL MU IL OL IR OR Gearshift DL = dashboard switch for left door (0 or 1) DR = dashboard switch for right door (0 or 1) CL = child lock (0 or 1) MU = master unlock (0 or 1) IL = inside left door latch (0 or 1) OL = outside left door latch (0 or 1) IR = inside right door latch (0 or 1) OR = outside right door latch (0 or 1) Gearshift (P N D 1 2 3 R) 1 1 1 1 1 1 1 1 D Both doors stay closed. Try another simulation? Type 1 for yes and 2 for no=>1 Please enter DL DR CL MU IL OL IR OR Gearshift DL = dashboard switch for left door (0 or 1) DR = dashboard switch for right door (0 or 1) CL = child lock (0 or 1) MU = master unlock (0 or 1) IL = inside left door latch (0 or 1) OL = outside left door latch (0 or 1) IR = inside right door latch (0 or 1) OR = outside right door latch (0 or 1) Gearshift (P N D 1 2 3 R) 1 1 1 1 1 1 1 1 P Both doors stay closed. Try another simulation? Type 1 for yes and 2 for no=>1 Please enter DL DR CL MU IL OL IR OR Gearshift DL = dashboard switch for left door (0 or 1) DR = dashboard switch for right door (0 or 1) CL = child lock (0 or 1) MU = master unlock (0 or 1) IL = inside left door latch (0 or 1) OL = outside left door latch (0 or 1) IR = inside right door latch (0 or 1) OR = outside right door latch (0 or 1) Gearshift (P N D 1 2 3 R) 0 0 0 1 0 1 0 0 P Left door opens Try another simulation? Type 1 for yes and 2 for no=>2 Reminder: Do not forget to include comments and indentation.
Project ID: 11598155

About the project

2 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
I am proffesional developer and have strong skills in C++ programming. I totally understand your task and can provide you this work.
$30 USD in 1 day
4.8 (29 reviews)
5.0
5.0

About the client

Flag of UNITED STATES
palm bay, United States
5.0
7
Member since Sep 23, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.