Saturday, May 22, 2010

Need help in C# programming!?

What code do I need to input to make the bottom program work?





Create a new windows forms application called PersonNames.





Add three labels to Form1.


Change the text to First, Middle, Last.


Add three textboxes to Form1.


Clear the Text property of each textbox.


Add three buttons to Form1.


Change the Text property to First, First + Last, First + Middle + Last.


Add a new class called Persons.


Add three public string instance fields to the class called firstName, middleName and lastName.


Add three constructors to the Persons class.


The first constructor should take one text argument and set the firstName field to the string passed in.


The second constructor should take two string arguments and set the firstName and lastName fields.


The third constructor should take three string arguments and set the firstName, middleName and lastName fields.


When the First button is clicked, create a new Persons object using the constructor that requires one argument. The argument should be the programmer’s first name.


When the First+Last button is clicked, create a second new Persons object using the constructor that takes two arguments. The arguments should be the programmer’s first and last names.


When the First+Middle+Last button is clicked, create a third new Persons object using the constructor that takes three arguments. The arguments should be the programmer’s first, middle, and last names.


When each button is clicked, display the firstName, middleName and lastName fields in the corresponding text boxes.

Need help in C# programming!?
Time to do your own work. its pretty clear to someone who knows the language what needs to be done.





Happy to help with specific questions.


No comments:

Post a Comment