diff --git "a/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6.sln" "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6.sln" new file mode 100644 index 0000000000000000000000000000000000000000..1b884839eb4f9cd6bae1366c2436ee5f540f7964 --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6.sln" @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication6", "ConsoleApplication6\ConsoleApplication6.csproj", "{8B8C5306-A1C4-4DF9-A506-0A9D6DC2FE93}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8B8C5306-A1C4-4DF9-A506-0A9D6DC2FE93}.Debug|x86.ActiveCfg = Debug|x86 + {8B8C5306-A1C4-4DF9-A506-0A9D6DC2FE93}.Debug|x86.Build.0 = Debug|x86 + {8B8C5306-A1C4-4DF9-A506-0A9D6DC2FE93}.Release|x86.ActiveCfg = Release|x86 + {8B8C5306-A1C4-4DF9-A506-0A9D6DC2FE93}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git "a/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Animals.cs" "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Animals.cs" new file mode 100644 index 0000000000000000000000000000000000000000..28d765321bddc867f2524dd73a8e96baaa98cb2c --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Animals.cs" @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ConsoleApplication6 +{ + public class Animals + { + public string AnimalName { set; get; } + public string AnimalColor { set; get; } + + public virtual void Move() + { + Console.WriteLine("都会移动"); + } + } + +} diff --git "a/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Car.cs" "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Car.cs" new file mode 100644 index 0000000000000000000000000000000000000000..01fbcc308c6579f93d4dd0ca2883b8e280a3148c --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Car.cs" @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ConsoleApplication6 +{ + class Car + { + } +} diff --git "a/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/ConsoleApplication6.csproj" "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/ConsoleApplication6.csproj" new file mode 100644 index 0000000000000000000000000000000000000000..90fdbb918cc01e63c7b430ce4d547895545d741c --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/ConsoleApplication6.csproj" @@ -0,0 +1,61 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {8B8C5306-A1C4-4DF9-A506-0A9D6DC2FE93} + Exe + Properties + ConsoleApplication6 + ConsoleApplication6 + v4.0 + Client + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Dog.cs" "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Dog.cs" new file mode 100644 index 0000000000000000000000000000000000000000..875d970723e6a53db7996a7d79afea725c82f8ee --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Dog.cs" @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ConsoleApplication6 +{ + public class Dog : Animals + { + public void Bite() + { + Console.WriteLine("狗会咬人"); + base.Move(); + } + } +} diff --git "a/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Fish.cs" "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Fish.cs" new file mode 100644 index 0000000000000000000000000000000000000000..42476fe41ad5d9fa50cdd73495de2105820afbc0 --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Fish.cs" @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ConsoleApplication6 +{ + public class Fish : Animals + { + public void Bubbles() + { + Console.WriteLine("鱼会吹泡泡"); + base.Move(); + } + } +} diff --git "a/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Program.cs" "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Program.cs" new file mode 100644 index 0000000000000000000000000000000000000000..4a266ee9aa2478262b890fd7f5a717af28dd15b8 --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Program.cs" @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ConsoleApplication6 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("输入你要查的动物!狗或鱼"); + string Name = Console.ReadLine(); + + if (Name.Equals("狗")) + { + Dog dog = new Dog(); + Console.WriteLine("输入狗的名字"); + dog.AnimalName = Console.ReadLine(); + + Console.WriteLine("输入狗的颜色"); + dog.AnimalColor = Console.ReadLine(); + + dog.Bite(); + } + + else if (Name.Equals("鱼")) + { + Fish fish = new Fish(); + Console.WriteLine("输入鱼的名字:"); + fish.AnimalName = Console.ReadLine(); + + Console.WriteLine("输入鱼的颜色:"); + fish.AnimalColor = Console.ReadLine(); + + fish.Bubbles(); + } + else + { Console.WriteLine("你输入错误,请重新输入"); } + + } + } +} diff --git "a/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Properties/AssemblyInfo.cs" "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Properties/AssemblyInfo.cs" new file mode 100644 index 0000000000000000000000000000000000000000..f7e26b6bd0195c3ceb0f7317aca02d2b582e53b0 --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Animals/ConsoleApplication6/Properties/AssemblyInfo.cs" @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("ConsoleApplication6")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("ConsoleApplication6")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("b8d55eb5-afed-478c-b185-ad2779bc3d99")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git "a/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5.sln" "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5.sln" new file mode 100644 index 0000000000000000000000000000000000000000..5be5ad8ac86b86563066c7703e9f53a054023eef --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5.sln" @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication5", "ConsoleApplication5\ConsoleApplication5.csproj", "{D0E42C69-4017-4407-969C-3F0768D0BCC4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D0E42C69-4017-4407-969C-3F0768D0BCC4}.Debug|x86.ActiveCfg = Debug|x86 + {D0E42C69-4017-4407-969C-3F0768D0BCC4}.Debug|x86.Build.0 = Debug|x86 + {D0E42C69-4017-4407-969C-3F0768D0BCC4}.Release|x86.ActiveCfg = Release|x86 + {D0E42C69-4017-4407-969C-3F0768D0BCC4}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git "a/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Car.cs" "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Car.cs" new file mode 100644 index 0000000000000000000000000000000000000000..07bb3fa17fd8d6f3d4e8837fe4756891a66fbb1f --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Car.cs" @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ConsoleApp5 +{ + public class Car : Garage + { + public string Carname { get; set; } + public string Carcolor { get; set; } + public int Carshu { get; set; } + + public static void run() + { + Console.WriteLine("车子可以跑"); + } + } +} diff --git "a/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/ConsoleApplication5.csproj" "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/ConsoleApplication5.csproj" new file mode 100644 index 0000000000000000000000000000000000000000..b05f5e374e85f3f6cebb1b2d10c5d2e4d5a4099d --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/ConsoleApplication5.csproj" @@ -0,0 +1,59 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {D0E42C69-4017-4407-969C-3F0768D0BCC4} + Exe + Properties + ConsoleApp5 + ConsoleApplication5 + v4.0 + Client + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Garage.cs" "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Garage.cs" new file mode 100644 index 0000000000000000000000000000000000000000..af9ea001b7c637135c9069d3d36f7fe4dca7cf0d --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Garage.cs" @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ConsoleApp5 +{ + public class Garage + { + public string Garagename { get; set; } + public string Garagesite { get; set; } + public string Garagephone { get; set; } + public static void repair() + { + Console.WriteLine("需要维修"); + } + } +} diff --git "a/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Program.cs" "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Program.cs" new file mode 100644 index 0000000000000000000000000000000000000000..e60178d456801f857860f8b39eefd5c4d1e23e32 --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Program.cs" @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ConsoleApp5 +{ + class Program + { + static void Main(string[] args) + { + Car car = new Car(); + + Console.WriteLine("输入车的名字:"); + car.Carname = Console.ReadLine(); + + Console.WriteLine("输入车的颜色:"); + car.Carcolor = Console.ReadLine(); + + Console.WriteLine("输入车的轮子:"); + car.Carshu = int.Parse(Console.ReadLine()); + if (car.Carshu == 4) + { + Car.run(); + } + else + { + + Garage.repair(); + Console.WriteLine(); + + Garage add = new Garage(); + + Console.WriteLine("输入修理厂的名字:"); + add.Garagename = Console.ReadLine(); + + Console.WriteLine("输入修理厂的地址:"); + add.Garagephone = Console.ReadLine(); + + Console.WriteLine("输入修理厂的电话:"); + add.Garagesite = Console.ReadLine(); + + } + } + } +} diff --git "a/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Properties/AssemblyInfo.cs" "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Properties/AssemblyInfo.cs" new file mode 100644 index 0000000000000000000000000000000000000000..81e4040c526114ada3ccbc982a6b4f7754594a08 --- /dev/null +++ "b/\346\236\227\346\262\263\346\243\256/Car/ConsoleApplication5/Properties/AssemblyInfo.cs" @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("ConsoleApplication5")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("ConsoleApplication5")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("22a77bd3-d86e-465c-b2e1-02e3029801d7")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")]