Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode Windows Develop CSharp
Title: Weapon Download
 Description: 1), defines an abstract class Weapon, the abstract class has two abstract methods attack (), move (): These two methods represent the weapons attacks and moves. (2), defines three classes: Tank, Flighter, WarShip are inherited from the Weapon, respectively, in different ways to achieve Weapon Class abstract methods. (3), write a class Army, on behalf of an army, this class has a property is an array of Weapon w (used to store all of the weapons owned by the armed forces) class provides a constructor in the constructor through the mass a parameter of type int to limit the class can have the maximum number of weapons, and to initialize the array with the size of the w. The class also provides a method addWeapon (Weapon wa), that represent the parameters wa added to the array w of weapons. In this class also defines two methods attackAll () and moveAll (), let w array and move all the weapons to attack. (4), write a main method to test the above procedure.
 Downloaders recently: [More information of uploader liuxiao]
 To Search:
File list (Check if you may need any files):
抽象类Weapon
............\_4
............\_4.sln
............\_4.suo
............\..\Army.cs
............\..\bin
............\..\...\Debug
............\..\...\.....\_4.exe
............\..\...\.....\_4.pdb
............\..\...\.....\_4.vshost.exe
............\..\...\.....\_4.vshost.exe.manifest
............\..\ClassDiagram1.cd
............\..\ClassDiagram2.cd
............\..\Flighter.cs
............\..\obj
............\..\...\Debug
............\..\...\.....\Refactor
............\..\...\.....\TempPE
............\..\...\.....\_4.csproj.FileListAbsolute.txt
............\..\...\.....\_4.exe
............\..\...\.....\_4.pdb
............\..\Program.cs
............\..\Properties
............\..\..........\AssemblyInfo.cs
............\..\Tank.cs
............\..\WarShip.cs
............\..\Weapon.cs
............\..\_4.csproj
    

CodeBus www.codebus.net