bernie benavides

Greenhorn
+ Follow
since Feb 04, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by bernie benavides

I did try that but that but it wouldnt break out of the loop I didnt really know where to put I tried under the for loops but it would only verify the first for loop. I would appreciate it if someone can explain to me how to break out of the loop after the three conditions are met ??
16 years ago
sorry I havent seen that method before. How would you write the code to break out if all conditions are met in the three if statements.
16 years ago
I need to have a user enter a date but i need to make sure that the inputs are only digits if not have the user re enter input. what would be a concise way to do it. I tried using a while loop that accepted inputs for month, day, year. but since I am not very experienced my program is huge can someone explain to me how to reduce the repetitveness of my program and also how to get out of this while loop. every thing I try is not working.



Edit by mw: Put code inside code tags.
[ February 12, 2008: Message edited by: marc weber ]
16 years ago
Thanks for the help however I cannot seem to write the code needed to get the user inputs of month day and year into the constructor that accepts the values through the parameter list does anyone have any examples how I could take inputs in one class and assign them to a constructor. This should be that hard but I am lost any help would be appreciated
16 years ago
Hi Im writing my first program using methods and objects and constructors. I am supposed to validate a date using a daterec driver program that has the constructor with a default date of today, a constructor that accepts the user inputs for month day and year and my validate method which checks to see if date is valid and a tostring method to convert the date into a string and print which i have done for the most part. the problem is the program I need to write to test this daterec class. I have to create three objects one named today and one anyday created w no arguments and display aa valid date, then also a noday object which displays invalid dates. I have an example but I am confused on passing the information as well as the code to do it

I would like some examples of how for example to print the dateREC and print the 1, 1 2008 with the object today I dont know what I need to get it over there please help. I also want to take the inputs from th user validate or invalidate the date and print with the anyDay or noDay objects.


Edit by mw: Added Code Tags and removed SHOUTING from subject line.
[ February 05, 2008: Message edited by: marc weber ]
16 years ago