Register and join over 40,000 other developers!
Recent Topics
-
The Game You Are Waiting For?
WendellHarper - Dec 06 2020 01:21 PM
-
Quora and Reddit Backlinks
WendellHarper - Dec 06 2020 01:14 PM
-
Delete account
pindo - Jul 23 2020 01:33 AM
-
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
-
Learn algorithms and programming concepts
johnnylo - Apr 23 2019 07:49 AM
Recent Blog Entries
Recent Status Updates
Popular Tags
- networking
- Managed C++
- stream
- console
- database
- authentication
- Visual Basic 4 / 5 / 6
- session
- Connection
- asp.net
- import
- syntax
- hardware
- html5
- array
- mysql
- java
- php
- c++
- string
- C#
- html
- loop
- timer
- jquery
- ajax
- javascript
- programming
- android
- css
- assembly
- c
- form
- vb.net
- xml
- linked list
- login
- encryption
- pseudocode
- calculator
- sql
- python
- setup
- help
- game
- combobox
- binary
- hello world
- grid
- innerHTML

Filters and Pipes problem
Started by toto_7, Nov 02 2011 01:48 PM
1 reply to this topic
#1
Posted 02 November 2011 - 01:48 PM
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
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
"Programming is like **. 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.)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download