Link to home
Start Free TrialLog in
Avatar of the_dude
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

cccdacccddbacbbcaccccccaadbbcc CAR1
abddacccddbacbbcaccccccaadbbcc CAR2
aaadacccddbacbbcaccccccaadbbcc CAR3
adadccccddbacbbcaccccccaadbbcc 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!!!!!!!!!
Avatar of ntdragon
ntdragon

we don't answer to homework questions
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
ASKER CERTIFIED SOLUTION
Avatar of Roger Alcindor
Roger Alcindor

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
good luck with your home-work .

what about the exam ?

can you send questions trough e.e.
durring an exam ?!
Avatar of the_dude

ASKER

it isnt homework!!!!!
Edited text of question.
Edited text of question.
thanks for almost beliving me, it really wasnt homework, everyone, including u thought it was, thanks for helping though