Hello,
I'm new in this kind of architecture and I'm finding some obstacles. I have a project with 3 classes. The goal is to take a list of names from an input file and store them in two other files according their status(Pass or non-Pass). Pass, is an input where has a specific ID and one of two(or both two) specific numbers. Also, if an input doesn't has the specific ID but has a specific 3rd number and one of two specific numbers above then is Pass too.
For example:
specific ID=xxxx - specificNum#1=1234 - specificNum#2=5678 - specificNum#3=9999
input#1: xxxx - 1234 - 0000 -->Pass
input#2: xxxx - 3333 - 0000 -->non-Pass
input#3: xxxx - 1234 - 5678 -->Pass
input#4: zzzz - 1234 - 0000 -->non-Pass
input#5: aaaa - 1234 - 9999 -->Pass
etc.
So my main class scanning the input line and searching for the specific ID. Second class taking the line and searching for specific number. Third class taking the line and writing it to the appropriate text file.
In main class also created three objects of 2nd class, each one has different searching numbers and two 2rd class, pass and non-pass
My first question is, I have to create another 2nd class that will doing different things that current does, or I can solve it with just 3 classes?
Thank you,
toto_7
1 reply to this topic
#1
Posted 02 November 2011 - 01:48 PM
"Programming is like sex. One mistake and you have to support it for the rest of your life."
-Michael Sinz|
|
|
#2
Posted 10 November 2011 - 09:17 AM
You could solve this with just one class.
Honestly, your question makes no sense. Could you explain better or provide code? Either way would help me answer your question better.
Also I don't understand how the test works. Is it that if it contains one of the numbers it passes? Or is it if it contains 1234 - 9999 in a logical order that it passes? (Another words the second number is larger than the first.)
Honestly, your question makes no sense. Could you explain better or provide code? Either way would help me answer your question better.
Also I don't understand how the test works. Is it that if it contains one of the numbers it passes? Or is it if it contains 1234 - 9999 in a logical order that it passes? (Another words the second number is larger than the first.)
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









