Limited Offer Get 25% off — use code BESTW25
No AI No Plagiarism On-Time Delivery Free Revisions
Claim Now

Student Assignment project Program 10.1

After studying sections 10.7 through 10.8 in your textbook, download a copy of Student Assignment Project from Blackboard, under Files. You will need to unzip the project and add it to your solution.

Using the Employee class (Figure 10.8 in textbook) as an example, complete the code missing from the Student class in Student Assignment project. The Student class should have the following members created in the order listed below.

Read-only auto-implemented properties FirstName (a string), LastName (a string), and BirthDate (a Date).

Instance variables catalog (a Date) and sNum (a string).

An initializing constructor to initialize all auto-implemented properties and instance variables.

A property named Catalog with the following.

public access modifier

a get that returns the catalog

a set that throws an exception if an attempt is made to store a catalog year that is greater than DateTime.Now.Year. The exception message is displayed by line 25 in StudentTest.

If no exception is thrown for the year, assign new value to catalog year.

A property named SNum with the following

public access modifier

a get that returns sNum with an “S” prepended.

a set that throws an exception if an attempt is made to store an sNum that does not have a length of eight. The exception message is displayed by line 35 n StudentTest.

a set that throws an exception if an attempt is made to store an sNum that is does not contain all integers. A string can be checked for all integer values with stringName.All(Char.IsDigit). Note that the using System.Linq; is required. The exception message is displayed by line 45 in StudentTest.

A ToString() that displays the output generated by line 54 (a statement students create).

Add the C# statements to the try/catch block starting on line 49 in StudentTest class to accomplish the requirements listed below. Create your C# statements in the order listed below. DO NOT make any changes to the statements in StudentTest outside of the try/catch block starting on line 49. See figure 1 below for formatting.

A WriteLine to display Lastname and Firstname for s1.

a WriteLine to display the ToString for s1.

a WriteLine to display the BirthDate for s1.

a WriteLine to display the BirthDate Month for s1.

a WriteLine to display the Catalog ToString for s1.

a WriteLine to display the Catalog Year for s1.

When finished, copy class Student to the bottom of class StudentTest. After that, copy your output to the bottom of class StudentTest. Upload StudentTest in Blackboard.

Year must be less than current year.

Parameter name: Year

Actual value was 2027.

SNum length is not eight.

Parameter name: SNum

Actual value was 1234567.

SNum characters are not all integers.

Parameter name: SNum

Actual value was 158945K9.

Display Name Properties: Red, Ryan

Display ToString():Name: Red, Ryan Birthday: 08/25/2000 Catalog: 2017 SNumber: S15983511

Display BirthDate using ToString(): 08/25/2000

Display BirthDate Month property: 08

Display Catalog ToString(): 06/13/2017

Display Catalog Year property: 2017

The post Student Assignment project Program 10.1 appeared first on My Assignment Online.

Plagiarism Free Assignment Help

Expert Help With This Assignment — On Your Terms

Native UK, USA & Australia writers Deadline from 3 hours 100% Plagiarism-Free — Turnitin included Unlimited free revisions Free to submit — compare quotes
Scroll to Top