Your program should use these lines to create credit cards and try to add them to an initially empty GlobalCredit instance (type.lib.GlobalCredit). When all lines have been read, print out information about the GlobalCredit instance as shown in the sample output below.
A complication: an attempt to add a credit card with the same number as one already in the GlobalCredit instance will fail. For this exercise, you will also enforce the restriction that no two cards in the GlobalCredit instance can have exactly the same cardholder name. If you read a line with exactly the same name as that on a card already in the GlobalCredit instance, then that line should be ignored.
%
% java Q1
For each credit card enter a line with colon-separated number:cardholder name:credit limit
123456:David Smith:5000
234567:William Roy:3000
345678:David James Bowie:10000
123456:Dudley Double:1000
456789:William Roy:2000
567890:Alex MacDonnell:2000
678901:Magnus Eisengrim:9999
The created GlobalCredit instance:
NUMBER LIMIT NAME
678901-5 9999.00 Magnus Eisengrim
345678-3 10000.00 David James Bowie
123456-6 5000.00 David Smith
234567-0 3000.00 William Roy
567890-1 2000.00 Alex MacDonnell
%
%
Here (again) are the common APIs that you may access:
Here is the command to submit your work
(further details regarding the submit command can also be
obtained by
typing man submit
Once again, you are encouraged to submit
regularly.
Newer submissions overwrite older ones.
submit 1020 labtest2F1 Q1.java