Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace WBLab5_1
- {
- class lab5Test
- {
- static void Main(string[] args)
- {
- lab5Con oTest = new lab5Con();
- Console.Write("First Name: ");
- String inone = Console.ReadLine();
- Console.Write("Last Name: ");
- String intwo = Console.ReadLine();
- String Fullname = (oTest.fixName(inone, intwo));
- oTest.MyName = Fullname;
- Console.WriteLine(oTest.MyName);
- Console.WriteLine(oTest.getString());
- }
- }
- }
- ###
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace WBLab5_1
- {
- public abstract class lab5Abb : ILab5
- {
- public abstract String MyName
- {
- get;
- set;
- }
- protected String CallMe(String inOne, String inTwo)
- {
- return (inOne + " " + inTwo);
- }
- public static String doNotMuch()
- {
- return ("Not Much");
- }
- public String getString()
- {
- return ("getString");
- }
- }
- public class lab5Con : lab5Abb
- {
- String _MyName;
- public lab5Con()
- {
- this._MyName = "No Name";
- }
- public lab5Con(String inString)
- {
- this._MyName = inString;
- }
- public String fixName(String inOne, String inTwo)
- {
- return (this.CallMe(inOne, inTwo));
- }
- override public string MyName
- {
- get
- {
- return this._MyName;
- }
- set
- {
- this._MyName = value;
- }
- }
- }
- }
- ##
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace WBLab5_1
- {
- public interface ILab5
- {
- string getString();
- }
- }
Add Comment
Please, Sign In to add comment