{"action":"closed","issue":{"url":"https://api.github.com/repos/RDKCH/Codes/issues/14","labels_url":"https://api.github.com/repos/RDKCH/Codes/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/RDKCH/Codes/issues/14/comments","events_url":"https://api.github.com/repos/RDKCH/Codes/issues/14/events","html_url":"https://github.com/RDKCH/Codes/issues/14","id":102847423,"number":14,"title":"OOProgUndertanding - AssemblyRobot.cs","user":{"login":"RDKCH","id":9130910,"avatar_url":"https://avatars.githubusercontent.com/u/9130910?v=3","gravatar_id":"","url":"https://api.github.com/users/RDKCH","html_url":"https://github.com/RDKCH","followers_url":"https://api.github.com/users/RDKCH/followers","following_url":"https://api.github.com/users/RDKCH/following{/other_user}","gists_url":"https://api.github.com/users/RDKCH/gists{/gist_id}","starred_url":"https://api.github.com/users/RDKCH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RDKCH/subscriptions","organizations_url":"https://api.github.com/users/RDKCH/orgs","repos_url":"https://api.github.com/users/RDKCH/repos","events_url":"https://api.github.com/users/RDKCH/events{/privacy}","received_events_url":"https://api.github.com/users/RDKCH/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-24T17:20:11Z","updated_at":"2015-08-24T17:20:18Z","closed_at":"2015-08-24T17:20:18Z","body":"using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace OOProgUnderstanding\r\n{\r\n    class AssemblyRobot\r\n    {\r\n        // this is not static property so the class would have to be instatiated in order to be available\r\n        public string Name { get; set; }\r\n\r\n        // this is available in the static instance\r\n        private static string staticName;\r\n\r\n        public static string StaticName\r\n        {\r\n            get { return staticName; }\r\n            set { staticName = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// encapsulates the process of creating a new car and putting and engine into it\r\n        /// </summary>\r\n        /// <param name=\"model\"></param>\r\n        /// <param name=\"engineType\"></param>\r\n        /// <returns></returns>\r\n        public Auto AsseblerCar(string model, Engine engineType)\r\n        {\r\n            Auto newCar = new Auto();\r\n            newCar.Model = model;\r\n            newCar.Engine = engineType;\r\n            return newCar;\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Declare the class as static\r\n        /// </summary>\r\n        /// <param name=\"model\"></param>\r\n        /// <param name=\"engineType\"></param>\r\n        /// <returns></returns>\r\n        public static Auto StaticAsseblerCar(string model, Engine engineType)\r\n        {\r\n            Auto newCar = new Auto();\r\n            newCar.Model = model;\r\n            newCar.Engine = engineType;\r\n            return newCar;\r\n        }\r\n        \r\n    }\r\n\r\n    /// <summary>\r\n    /// This is how the whole class is static\r\n    /// it required only static methods and properties\r\n    /// </summary>\r\n    static class StaticAssemblyRobot\r\n    {\r\n        \r\n\r\n        // this is available in the static instance\r\n        private static string staticName;\r\n\r\n        public static string StaticName\r\n        {\r\n            get { return staticName; }\r\n            set { staticName = value; }\r\n        }\r\n\r\n        public static Auto StaticAsseblerCar(string model, Engine engineType)\r\n        {\r\n            Auto newCar = new Auto();\r\n            newCar.Model = model;\r\n            newCar.Engine = engineType;\r\n            return newCar;\r\n        }\r\n\r\n    }\r\n}\r\n"}}