Make a form with a text property of friends

Assignment Help Computer Engineering
Reference no: EM1332197

Create a Windows Form Application project in C# as per following guidelines.

1. Create a Form with a text property of Friends.

2. Add a Class file to your project and name it Friend.

3. In the Friend class declare the following:
o private string lastName;
o private string phoneNumber;
o private int month;
o private int day;
o private string firstName;

4. Write accessors for each of the declared class variables.

5. Override the class ToString method to return a string in the following format: FirstName + ',' + LastName + ',' + PhoneNumber + ',' + Month + "," + Day

6. Add a TabControl to the form and size it so that it fills the form.

7. Name the first tabPage Entry.

8. On the Entry tabPage add four textboxes to take entry for a first name, last name, birth month, and birthday and add a MaskedTextbox to take entry for a phone number formatted as 999-9999.

9. Add an Enter Friend button which will process the entries made in the textboxes; writing each entry to a file and an Exit button which will exit the application.

10. Name the second tabPage Read.

11. On the Read tabPage, place a Read button which will read the file entries written to the file on the Entry tabPage, an Exit button that will call the Entry page exit button click event and a listbox that will display each entry read from the file when the Read button is clicked.

12. Name the third tabPage Reminder.

13. On the Reminder tabPage, place a textbox that will take an input for the birth month entries that will be displayed, a Reminder button which will read the file entries and display the file entries which have a month value that matches the value entered in the textbox, an Exit button that will call the Entry page exit button click event, and a listbox that will display each matching entry read from the file when the Reminder button is clicked.

14. At the Form level instantiate a Friend object and declare/instantiate a FileStream/StreamReader and a FileStream/StreamWriter object that will open a Friends.txt file with the FileMode set to OpenCreate, FileAccess set to Read, FileShare set to ReadWrite and FileMode set to Append, FileAccess set to Write and FileShare set to ReadWrite respectively.

15. The data entry button will extract the inputs from the textboxes on the Entry tab and will:

o Write the data as a comma delimited record to a .txt file using the Friend object ToString method you overrode in the Friend class; also display a messagebox that displays what was written to the file.

o Include a try-catch block that will display a messagebox with error message for any errors encountered in reading from the textboxes and writing to the file.

o Clear the write stream buffer.

o Clear entries in the textboxes.

16. The Read button will accomplish the following:

o Read the file and display in the listbox each record splitting out the fields, eliminating the comma delimiters and placing spaces between the fields.

o Reset the file position pointer to the beginning of the file for the next file read.

17. The Reminder button will accomplish the following:

o Take a text entry for the birth month to be searched for.

o Read the file and display in the listbox each record splitting out the fields, eliminating the comma delimiters and placing spaces between the fields.

o The birth month and day will be separated by a "/" when the record(s) is displayed.

o Reset the file position pointer to the beginning of the file for the next file read.

o Clear the entry in the textbox.

18. When clicking out of tabPage 2 and 3 which contain the listboxes clear the display contents of the listboxes.

19. When the application is terminated close all open FileStream objects.

Please provide the complete project folder for each project (not just the .cpp file), and document the code well.

Reference no: EM1332197

Questions Cloud

The financial management and accounting issues : Consider the statement: "Strategy analysis seems to be an unnecessary detour in doing financial statement analysis. Why can't we just get straight to the financial management and accounting issues?"
Make a form for a car rental company : The number of days that the customer would have the car will be determined by the difference between the current date and the future date selected on the calendar.
Explain how do you go about drawing an indifference : Explain how do you go about drawing an indifference for such a utility function.
Question about hiring process : Question about Hiring Process - what are some differences between talents, skills and knowledge/experience
Make a form with a text property of friends : On the Entry tabPage add 4 textboxes to take entry for a first name, last name, birth month, and birthday and add a MaskedTextbox to take entry for a phone number formatted as 999-9999.
A reinforcement strategy to help p&g product : Since many of P&G's consumer products are products used every day to satisfy customer needs, the company advertises frequently. However, the cost of advertising has increased dramatically over the years and P&G is concerned
Elements of your company''s discipline system : Show the elements of your company's discipline system or process and explain whether you feel it is effective or not in handling difficult or ineffective employees
The cost of a seasonal pass to six flags great adventure : The cost of a seasonal pass to six flags great adventure is not much more than a weekly pass.
Capital budgeting-computing npv : A company has developed improvements to a product line. The plant can be converted in one of two ways. Evaluate the NPV of the Type I plant bu using a 12% discount rate.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Contemporary information technology

Explain a contemporary information technology issue for which our society’s moral guidelines appear to be nonexistent or unclear.

  How can the receiver detects the error

UDP uses 1's complement for its checksums. assume you have the following three 16-bit words 0100010001000100, 0101010101010101, 0011001100110011. What is the 1's complement of the sum of these 16-bit words.

  Designing the erd

Design an ERD consisting of the Order and Customer entity types connected by 1-M relationship from the Customer to Order.

  Laws and regulation in telecommunications field

What gives the federal government the right to regulate the Telecommunications arena, and what is the purpose of laws and regulations. Do you think we need laws and regulation in the telecommunications field at all? Why or why not?

  What will do to get deadline to receive a passing grade

What will do to get deadline to receive a passing grade? You have to complete and submit course project previous to the deadline to receive a passing grade for this course.

  Use the int cast process to convert to an integer

give Output the corresponding letter grade along with the initial number entered in decimal format utilizing the printf method and format specifiers. Output the number in only 3 decimal places.

  Make binary search tree that will accept integers in order

modify a C++ Binary Search Tree that will accept integers in this order: 35, 18, 48, 72, 60, 25. Ask user for input and search tree utilizing integer input. Return "True" if input integer is found or "False" if it is not found in tree.

  Define defense in depth

Define defense in depth

  Develop a checkout lane simulation

Develop a checkout lane simulation that can be used to determine the optimal number of lanes that Cougar Mart should have open.

  What is a backup strategy or active directory?

What is a backup strategy or Active Directory? The small business that you created new domain controllers for now wants you to develop a backup and recovery plan for Active Directory.

  Write down a simple java payroll code

Write down a simple Java payroll code. It needs to ask for the employee name, hours worked, and hourly rate.

  Imagine that you''re the manager of a small project

suppose that you're the manager of a small project. What baselines would you define for the project and how would you control them, also state what are baselines?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd