Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
Recent Blog Entries
Recent Status Updates
- Managed C++
- Visual Basic 4 / 5 / 6
- linked list
- hello world
Filters and Pipes problem
Posted 02 November 2011 - 01:48 PM
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.
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
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?
"Programming is like **. One mistake and you have to support it for the rest of your life."-Michael Sinz
Posted 10 November 2011 - 09:17 AM
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.)