|
A. Title:
Pig-Latin
B. Application:
Control Structures
Procedures
Arrays
Object-Oriented
C. Program Specification:
Project Name: MacProb3
Project Type: Windows Application
D. Requirement Description:
This English to Pig Latin translation program performs a (near-) perfect
translation of any English text to Pig Latin. Words, phrases, sentences,
paragraphs and more.
Basically, the Pig Latin system used here works as follows:
* Words that start with a vowel (A, E, I, O, U) simply have "WAY"
appended to the end of the word.
* Words that start with a consonant have all consonant letters up to
the first vowel moved to the end of the word (as opposed to just the
first consonant letter), and "AY" is appended. ('Y' is counted as a
vowel in this context)
The algorithm incorporates the following features and special case functionality:
* Ensures proper capitalization
* Correct upper case and lower case formatting
* Correctly translates "qu" (e.g., ietquay instead of uietqay)
* Hyphenated words are treated as two words
* Words may consist of alphabetic characters only (A-Z and a-z)
* All punctuation, numerals, symbols and whitespace are not modified
Implement the conversion process in a class named CPigLatin with the following
basic structure (you may include other properties/methods if you want):
Properties:
- EnglishText
- PigLatinText
Method:
- Convert
Write a complete Visual Basic .NET program to translate english words
to pig-latin words. Use the CPigLatin class in a Form that accepts
long texts for english words. The Form should include a Convert button
that invokes the Convert method of the CPigLatin class and then displays
the pig-latin words in a textbox.
You may use any string manipulation functions available in Visual Basic .NET.
E. Sample:
English format text:
Enter the English text here that you want translated into
Pig Latin. This is accomplished via this HTML document and
accompanying JavaScript program. Note that hyphenated words
are treated as two words. Words may consist of alphabetic
characters only (A-Z and a-z). All punctuation, numerals,
symbols and whitespace are not modified.
Pig-Latin format text:
Enterway ethay Englishway exttay erehay atthay ouyay antway
anslatedtray intoway Igpay Atinlay. Isthay isway accomplishedway
iavay isthay HTMLAY ocumentday andway accompanyingway AvaScriptjay
ogrampray. Otenay atthay yphenatedhay ordsway areway eatedtray
asway otway ordsway. Ordsway aymay onsistcay ofway alphabeticway
aracterschay onlyway (Away-ZAY andway away-zay). Allway unctuationpay,
umeralsnay, ymbolssay andway itespacewhay areway otnay odifiedmay.
hel
|
|
|
|
|
Please don't repost - Also, do your own homework assignments.
|
|
|
|
|
yea its really an anssignments.. im just here to ask help.. thanks anyway..
|
|
|
|
|
i have a window form consists around 30 textbox and label, so i don't want disable all by write code one by one , all any idea ? for example , using a for loop to detect all label and textbox and disable it?
Regards,
Chee ken
|
|
|
|
|
for each (Control control in Controls)
control.Enabled = false
end for
I don't 'do' VB, the syntax may be off. However, there is a Controls collection in your form that you can foreach over.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
for each c as Control in me.controls<br />
if typeof c is textbox then 'for textbox you can put label or whatever other controls<br />
'do actions (e.g. c.enabled = false)<br />
end if<br />
next
Posted by The ANZAC
|
|
|
|
|
If Not cbYear.SelectedValue.Equals(Now.Year.ToString) Then
' Examine every control.
For Each ctl As Control In Me.Controls
If TypeOf ctl Is TextBox Then
ctl.Enabled = False
On Error GoTo 0
End If
Next ctl
Else
For Each ctl As Control In Me.Controls
If TypeOf ctl Is TextBox Then
ctl.Enabled = True
On Error GoTo 0
End If
Next ctl
End If
cbYear is a combobox, why this code cannot work ? If i comment " If TypeOf ctl Is TextBox Then" then all control will disable.
thanks
Regards,
Chee ken
|
|
|
|
|
because you need to change is Textbox to is Combobox .
Posted by The ANZAC
|
|
|
|
|
or you can put them in a GroupBox and, set GroupBox's enable property to false
Chatura Dilan
|
|
|
|
|
Same for a Panel .
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Thanks for you all help!;)
Regards,
Chee ken
|
|
|
|
|
Hi! I need to release a VB application that views a crystal report. It runs ok in my dev machine where Crystal Rep 7 dev. suite is installed. I install the app in a win 2000 box and run crystl32.exe (which I found in visual studio install cd 2) but as it turns out crystl32.exe is for cyrstal rep version 4.6. So the VB app crashes at the point where the report is viewed.
Help please.
Ahrvie
Ahrvie
|
|
|
|
|
You need to include the Crystal Reports libraries etc in your installer, and have your installer register them
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hi,
Thanks for your input. It redirected me back to my initial approach (before I got distracted with crystl32.exe which turnout to be for version 4.6 -too old). I looked for the Runtime File Requirements doco that came with Seagate CR 7 which I installed in my dev machine. I included in my installation every dll that I seemed relevant. In the end I still had the error message "cannot find pdsoledb.dll". I could not find this file anywhere in my machine (with Crystal Rep 7 completedly installed).
This takes me back to the background of my implementation.
My .net application is running a legacy VB app that calls and print crystal rep on screen. I did not write the legacy app it was just handed to us.
MAYBE, the legacy vb code was using a version of crystal different from the only I have installed in my machine (version 7). Would this explain why i cant find pdsoledb.dll in my machine? AND it is not mentioned in the Runtime File Req. doco.
If so, I have to track down the person who can tell me the crystal rep version I need to install.
Am I on the right track here??? I'm getting quite dizzy running in circles. HELP.
Ahrvie
Ahrvie
|
|
|
|
|
A quick search on google tells me that pdsoledb.dll is a library for an OLE DB driver. I would therefore hazzard a guess that it is not a part of crystal reports
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hi Steve,
The weird thing is,installing Crystal Rep 7 gets rid of this message. However, the pdsoledb.dll is not installed with CRep 7.
I am getting really confused now.
I really appreciate your time and effort, Steve.
Ahrvie
Ahrvie
|
|
|
|
|
I am thinking CR7 is quite an old version. It may be the pdsoledb.dll is a file installed with Windows 98 or 2000 and has been superceded by something else in WinXP. Have you got a Win98 and 2000 PC you can check?
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Steve,
I installed the applicated in boxes with Windows 2000 with SP4 and Windows Server 2003 sp1 and got the same problem. I searched for the file in both machines and the closest I can find is pds.dll.
How/where can I check to find out which is referencing this dll?
Thanks very much for the time and effort you're giving.
I really appreciate it.
ahrvie
Ahrvie
|
|
|
|
|
IT appears that pdsoledb.dll was replaced with p2soledb.dll in CR v8. Does this file exist on your PC?
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Steve,
I need to get back to you on that next week as I am away from the test beds due to a training I have to attend.
Appreciate your help.
Thanks,
Ahrvie
Ahrvie
|
|
|
|
|
I am coding a program which i would like to send strings of words to Internet explorer and i've played around with the sendkeys function built into .net but with no success
i've read a few articles about using keybd_event and user32.dll however I haven't had any success with that either...
i was looking for either some helping words to guide me in the right direction... i can get the sendkeys function to output to programs like notepad, however, it does not work to internet explorer (note: i'm not tryin to type into a textbox in IE)...
as far as the keybd_event i'm not exactly sure how to call to the user32.dll and then use that to output to IE..
i really feel like this should be simpler thatn what i'm making it, but really any advice would be really appreciated! Thanks!
|
|
|
|
|
gatorlaid wrote: (note: i'm not tryin to type into a textbox in IE)...
Where are you hoping for the text to go then ? Sounds like the problem is one of focus in IE, the right place doesn't have input focus when you send the key strokes.
gatorlaid wrote: as far as the keybd_event i'm not exactly sure how to call to the user32.dll and then use that to output to IE..
www.pinvoke.net is the place for info on calling native APIs
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Where are you hoping for the text to go then ? Sounds like the problem is one of focus in IE, the right place doesn't have input focus when you send the key strokes.
I've actually able to get focus to the IE window, but for some reason the Sendkeys function must not actually simulate keystrokes... i'm sending the string to the window in general, the text does not actually show up anywhere... this is why i simply need to simulate the actual keys being pressed
thanks for the site tho! i'm definitely looking into it further
|
|
|
|
|
These are two questions posed by my profesor..........how can this be done?
1. The table below gives the 2002 and 2003 sales for the five top restaurant chains.
a. Place the data into an array.
b. Calculate and display the table and the yearly change in sales for each restaurant.
2002 Sales 2003 Sales (in millions)
McDonalds 20.3 22.1
Burger King 8.7 7.9
Wendys 7.1 7.5
Subway 5.2 5.7
Taco Bell 5.2 5.3
2. The scores for the top three golfers at the 2005 Buick Invitational are shown in the table
below.
a. Place the data into an array.
b. Compute the total score for each player.
c. Compute the average score for each round.
Display the original data and the computed data.
Round 1 Round 2 Round 3 Round 4
Tiger Woods 69 63 72 68
Luke Donald 68 67 67 73
Bernhard Langer 69 69 67 72
Thanks for any help that can be provided
|
|
|
|
|
ualr wrote: These are two questions posed by my profesor..........
Then it's homework. How do YOU think it should be done ? Do you know what an array is ? What do you know about working with arrays ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|