QuestionQuestion

You have already created a new WPF app named"StudentRegistration".
The application contains a class called Person that will holds the basic information needed about a person, as well as two more classes named Student and Instructor which derive from the Person class. The following data has been identified and given a data type. Justify the data type you have given each item in the class. Data type is important because it allows us to determine the type of error and exception handling needed for the application to run properly and handle errors without it closing unexpectedly or giving the user error messages.
Student                                                 Instructor
Student ID                                           Instructor ID
Salutation                                             Salutation
First Name                                           First Name
Last Name                                           Last Name
Street Address                                     Street Address
Zip                                                         Zip
Phone                                                    Phone
Employer                                              Created By
Registration Date                                  Created Date
Created By                                           Modified By
Created Date                                        Modified Date
Modified By
Modified Date
In your WPF Application, adda limit to the zip code box that only allows for 5 characters to be entered. In your xaml.es file, add try/ /catch blocks to handle any Forma EExcept ion occurrences for integers. Cast incoming string data to int for all textboxes accepting an integer, using the Int32. TryParse method (zip and phone). Ensure that all of your try/catch blocks include a finally.
Answer the following question: If we are using a TryPare method, do we need a try/catch block? Why or why not?

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StudentRegistration
{
    class Person
    {
       private string id;
       private string salutation;
       private string firstName;
       private string lastName;
       private string streetAddress;
       private string zip;
       private string phone;
       private string createdBy;
       private string createdDate;
       private string modifiedBy;
       private string modifiedDate;
      


       /// <summary>
       /// constructor
       /// </summary>
       /// <param name="id"></param>
       /// <param name="salutation"></param>
       /// <param name="firstName"></param>
       /// <param name="lastName"></param>
       /// <param name="streetAddress"></param>
       /// <param name="zip"></param>
       /// <param name="phone"></param>
       /// <param name="createdBy"></param>
       /// <param name="createdDate"></param>
       /// <param name="modifiedBy"></param>
       /// <param name="modifiedDate"></param>
       public Person(string id, string salutation,
            string firstName, string lastName, string streetAddress,
            string zip, string phone, string createdBy, string createdDate,
            string modifiedBy, string modifiedDate...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

$30.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available C-Family Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats