Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Having a problem with this code. Error say its a handling error towards the end of the program: private void display() { throw new NotImplementedException();

Having a problem with this code. Error say its a handling error towards the end of the program:

private void display()

{

throw new NotImplementedException();

}

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

namespace GirlsScout {

//GirlScout class defintion class DemoScouts { static string motto = "to obey the Girl Scout Law.";

private string name; private int troopnumber; private double dues;

//Ovreloaded constructors public DemoScouts() { name = "unknown"; troopnumber = 0; dues = 0; }

public DemoScouts(string name) { this.name = name; troopnumber = 0; dues = 0; }

public DemoScouts(string name, int troopnumber) { this.name = name; this.troopnumber = troopnumber; dues = 0; }

public DemoScouts(string name, int troopnumber, double dues) { this.name = name; this.troopnumber = troopnumber; this.dues = dues; }

//Name property public string Name { set { name = value; } get { return name; } } //TroopNumber property public int TroopNumber { set { troopnumber = value; } get { return troopnumber; } } //Dues property public double Dues { set { dues = value; } get { return dues; } }

public void printMotto() { Console.WriteLine("On my honor, I will try: To serve God and my country, " + " To help people at all times, And to obey the Girl Scout Law."); }

//method to display object data values public void display() { Console.WriteLine("Name : " + name); Console.WriteLine("Troop Number : " + troopnumber); Console.WriteLine("Dues : " + dues); Console.WriteLine("Motto : " + motto); }

} }

namespace GirlsScout { class GirlScout { private string v; private int v1; private int v2;

public GirlScout() { }

public GirlScout(string v) { this.v = v; }

public GirlScout(string v, int v1) : this(v) { this.v1 = v1; }

public GirlScout(string v, int v1, int v2) : this(v, v1) { this.v2 = v2; }

static void Main(string[] args) {

//Create an object of no argumets GirlScout gs = new GirlScout(); gs.display();

gs.printMotto();

//Create an object of 1 argumets GirlScout gs1 = new GirlScout("USA-Scouts"); gs1.display();

//Create an object of 2 argumets GirlScout gs2 = new GirlScout("USA_Scouts", 2121); gs2.display();

//Create an object of 3 argumets GirlScout gs3 = new GirlScout("USA_Scouts", 2121, 33); gs3.display();

Console.ReadKey();

}

private void display() { throw new NotImplementedException(); }

private void printMotto() { throw new NotImplementedException(); } } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions

Question

i need 8 8 7 .

Answered: 1 week ago

Question

=+ Have they changed the way employers view IP?

Answered: 1 week ago