Back | Reverse | Quick Reply | Post Reply |

3D Array with Restrictions
Link | by Artie on 2010-03-30 12:34:19
I have to create a 3D array where the user inputs a phone number (3 of them) and determines whether or not it is valid based on any kinds of restrictions I put.

Pleas some help?

Re: 3D Array with Restrictions
Link | by gendou on 2010-03-30 12:41:39 (edited 2010-03-31 21:05:07)
1. Why a 3D array?
A list of 3 phone numbers is a single-dimensional array with 3 elements in it.

2. What language are you using?

3. What do you mean by "restrictions"?


Re: 3D Array with Restrictions
Link | by Artie on 2010-03-30 23:18:31
Sorry it's not 3 phone numbers, it's as many as the user inputs. The three restrictions are going to be three different phone numbers. When the user inputs a phone number, if the number he/she inputs is within a restriction, then it is invalid, if it doesn't meet the restriction, then it's valid.

Re: 3D Array with Restrictions
Link | by gendou on 2010-03-31 21:03:22 (edited 2010-03-31 21:06:40)
First, I won't help you further until you answer all my questions.
Please read my first post and reply to the numbered questions, including:

4. What do you mean by "within a restriction"?

You're using the term "restriction" in a strange way.
Typically, given a restriction X, user input is rejected if it matches X.
Curiously, you seem to have described the opposite...

Generally speaking, you won't be able to code something until you can DESCRIBE IT logically.
I'd say this is the most important thing for you to focus on in your studies!


Re: 3D Array with Restrictions
Link | by Artie on 2010-04-02 14:45:57
1. I spoke with my professor. Instead of three phonenumbers, he'd like a few more, perhaps that's why he wants a 3D array.
2. I'm using Java
3. Restrictions: He wants us to create three where each contain five integers. Each restriction has a set of numbers where when the user inputs a phone number, the program goes through the restrictions in order to see if what the user inputted is valid or not.

In this case:
Valid: The phone numbers do not have any of the numbers within the restrictions
Invalid: The phone numbers do have at least one number within the restrictions.

I apologize if you think I can't focus on describing it logically.

Back | Reverse | Quick Reply | Post Reply |

Copyright 2000-2025 Gendou | Terms of Use | Page loaded in 0.0027 seconds at 2025-01-16 12:30:52