the_dude
asked on
ARRAYS
Hi
I have to write a program involving arrays and am having trouble figuring out where to start. Here it is, if you could please give me your opinion on how to write it, that would be great, thanks:
Cars have been tested with A-E(good through bad) for how the preformed. The are in a file called inData.
INPUT:
read the input data from file inData. The first data line contains the key to the standards. For example, if a certain character position contains an "A", then every vehicle must receive an "A" rating for the corresponding test, or be rejected.
The test letters are the first 30 characters, and the are followed by an integer number that indicated how many vehicles were tested(n).
The next n lines contain test results for various vehicles in the first 20 character positions, followed by the vehicles registration/license ID in the next (up to) 8 character positions.
OUTPUT:
for each vehicle, output the reg/lic ID, followed by PASSED if the vehicle satisfies all tests, or FAILED if any of the test results dont meet standards. For failed ones, shoe the number of each failed test, the required result and the actual result should also be printed.
EXAMPLE INPUT FILE
cccdacccddbacbbcaccccccaad bbcc CAR1
abddacccddbacbbcaccccccaad bbcc CAR2
aaadacccddbacbbcaccccccaad bbcc CAR3
adadccccddbacbbcaccccccaad bbcc CAR4
EXAMPLE OUTPUT
CAR2 FAILED
Test 3 required C Actual D
CAR3 PASSED
CAR4 FAILED
Test 2 Required C Actual D
Test 5 Required A Actual C
IT ISNT HOMEWORK!!!!!!!!!
I have to write a program involving arrays and am having trouble figuring out where to start. Here it is, if you could please give me your opinion on how to write it, that would be great, thanks:
Cars have been tested with A-E(good through bad) for how the preformed. The are in a file called inData.
INPUT:
read the input data from file inData. The first data line contains the key to the standards. For example, if a certain character position contains an "A", then every vehicle must receive an "A" rating for the corresponding test, or be rejected.
The test letters are the first 30 characters, and the are followed by an integer number that indicated how many vehicles were tested(n).
The next n lines contain test results for various vehicles in the first 20 character positions, followed by the vehicles registration/license ID in the next (up to) 8 character positions.
OUTPUT:
for each vehicle, output the reg/lic ID, followed by PASSED if the vehicle satisfies all tests, or FAILED if any of the test results dont meet standards. For failed ones, shoe the number of each failed test, the required result and the actual result should also be printed.
EXAMPLE INPUT FILE
cccdacccddbacbbcaccccccaad
abddacccddbacbbcaccccccaad
aaadacccddbacbbcaccccccaad
adadccccddbacbbcaccccccaad
EXAMPLE OUTPUT
CAR2 FAILED
Test 3 required C Actual D
CAR3 PASSED
CAR4 FAILED
Test 2 Required C Actual D
Test 5 Required A Actual C
IT ISNT HOMEWORK!!!!!!!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
good luck with your home-work .
what about the exam ?
can you send questions trough e.e.
durring an exam ?!
what about the exam ?
can you send questions trough e.e.
durring an exam ?!
ASKER
it isnt homework!!!!!
ASKER
Edited text of question.
ASKER
Edited text of question.
ASKER
thanks for almost beliving me, it really wasnt homework, everyone, including u thought it was, thanks for helping though
ask a direct QUESTION and send us your code or your ideas and we will try to help we can't do it for you