Need help to do my Class assignment before 18-May-2001
[ Follow Ups ] [ Post Followup ] [ Message Board for Team 27297 ]

Posted by Daniel on May 15, 19101 at 20:46:08:

My name is Daniel. I have returned to school after an absence of 20 years. I am currently taking a course on Turbo Pascal and am using Borland's version 5.5 in learning it. I feel a bit lost and panicky about it right now. Frustration is mounting and I have been seeking help. I wonder if you could assist me with Pascal as you so generously offered this chat on Pascal. I take it that you are a Pascal specialist! and am seeking your help!!! Could you provide me some hints as per how I could write this program?!
My little program I am to design before 19-May-2001 must :
a) accept either upper or lowercase input
b) the choice menu should be roughly centered on the screen
c) when user makes a choice from the menu, the screen should clear and a new screen appropriate to the chosen option should replace the menu. When user has finished with that option the screen should clear and the menu should reappear in its original place. The screen should also be cleared within an option choice after prompting the user for input and before outputting a result.
d) HINT: a CASE statement is the most appropriate structure for processing a menu. The control loop should be in a procedure, not in the main program.
This program displays amenu to a user, and based on the user's selection displays appropriate screens to accomodate their selection. The menu should be repeatedly displayed until the user wishes to exit. The menu has 3 options: Envelope, Juggling Registry, and Exit.
1. Envelope
 Prompt the user for first name, last name, street address, city, province, postal code. Output should be as if it were printed on an envelope, and roughly centered on screen.
 Should display each part (i.e. first name, last name, street name, city) with the first letter in uppercase and the remaining letters in lowercase. It should also work for hyphenated names like o'henry > O'Henry. Letters for province and postal code should all be uppercase.
 To do this I was told I would need to write a function called Convert. This function would take a string as input and would return a converted string.
 I was told this Convert function would have 2 helper functions, IsChar and DownCase. These helper functions would be called from Convert.
 IsChar would take a character as input and return TRUE if that character is an alphabet character.
 DownCase would take a character as input and return the lowercase version of that character.
Hints I were given are:
-Use a loop to process the input string character-by-character. To get at individual characters in a string you specify the position, i.e. Name[1] specifies the first position in a string variable called Name.
-There are several built-in functions that would come in handy for this: ORD, CHR, UPCASE, and LENGTH.
2. Juggling Registry
Here is a complicated one. Assume that there are 5 things that can be juggles that my user is interested in: rings. beanbags, clubs, balls, and flaming torches. Every juggler that can juggle rings can also juggle balls. Everyone who can juggle balls can also juggle beanbags. If a juggler can handle flaming torches that person can also juggle clubs, since a torch is a kind of club. Not all clubs jugglers are experienced with torches, but all clubs jugglers can juggle rings.
I am to set up 5 BOOLEAN variables initialized to FALSE, one for each object that can be juggled, and display the results on the screen.
3. Exit
Clear the screen when the user leaves the program.



Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:
Optional Link URL:
Link Title:
Optional Image URL:

Sorry, we are no longer accepting entries to this message board.


[ Follow Ups ] [ Post Followup ] [ Message Board for Team 27297 ]