Can someone tell me if I am on the right track with these instructions? Can someone help me with the ToString() step? I am new to C#
Create an application class named LetterDemo that instantiates objects of two classes named Letter and CertifiedLetter and that demonstrates all their methods.
The classes are used by a company to keep track of letters they mail to clients. The Letter class includes auto-implemented properties for the Name of the recipient and the Date mailed (stored as strings).
Create a child class named CertifiedLetter that includes an auto-implemented property TrackingNumber (of type string) that holds a tracking number for the letter.
Next, include a ToString() method that overrides the Object class’s ToString() method and returns a string that contains the name of the class (using GetType()) and the respective class’s data field values. Use default, empty constructor for both classes.
using System;
using static System.Console;
using System.Globalization;
class LetterDemo
{
static void Main()
{
class LetterDemo
{
static void Main(string[] args)
{
LetterObject = new Letter();
CertifiedLetter = new CertifiedLetter()
}
}
public class Letter()
{
// Set the class properties
private string name;
private string dateMailed;
// Get set methods
public string Name
{
get {return name; }
set { name = value; }
}
// Property for DateMailed
public string DateMailed
{
get {return dateMailed; }
set {dateMailed = value; }
}
// Override the ToString() method
public ovveride string ToString()
{
return $"Name {Name},
}
}
public class CertifieddLetter : Letter
{
public string TrackingNumber {get; set};
}
}
}