通關(guān)流程圖文攻略 孤狼第四章怎么打
通關(guān)流程圖文攻略 孤狼第四章怎么打
孤狼lonewolf第4章停車場徹底端掉停車場怎么通關(guān)?潛行狙擊,神秘暗殺狙擊游戲孤狼LONEWOLF現(xiàn)已上架,下面小編就為大家?guī)砉吕莑onewolf第4章第6關(guān)停車場完美通關(guān)攻略,幫助大家了解?孤狼lonewolf第4章停車場完美通關(guān)技巧?,一起來看看吧~ 孤狼lonewolf第4章停車場徹底端掉停車場完美通關(guān)攻略 小編提示:本關(guān)卡運(yùn)用的是手槍,注意自己的瞄準(zhǔn)精度 一共五個人,是很考驗(yàn)手速的 建議先設(shè)計(jì)這個車后面的,因?yàn)橐坏╅_始設(shè)計(jì),他的位置是最難最快射擊的 一定要快,千萬不能有失誤 以上就是小編為大家?guī)淼年P(guān)于孤狼lonewolf第4章停車場徹底端掉停車場完美通關(guān)攻略,希望大家喜歡~
請高手幫我調(diào)試下這個工廠方法模式的例子
不得不批評你四點(diǎn)
1.代碼嚴(yán)重不規(guī)范
?? 接口和類名的首字母應(yīng)該而且必須大小
2.不注重界面的美觀
?? 輸出應(yīng)使用WriteLine或者字符串結(jié)尾加換行符以達(dá)到換行目的 否則輸出來亂七八糟的 鬼都看的暈
3.基本的接口常識都很失敗
?? 你所謂的Apple Strawberry? Grape 這些同屬于Fruit接口類型的產(chǎn)品居然都沒有實(shí)現(xiàn)該接口
4.人品太差
?? 請人幫忙請尊重他人的付出 應(yīng)該給分 每次都想白拿答案 以后沒人愿意幫你的
完整代碼:
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
??? //fruit.cs
??? public interface Fruit
??? {
????void grow();
????void harvest();
????void plant();
??? }
??? //fruitGardener.cs
??? public interface FruitGardener
??? {
????Fruit Factory();
??? }
??? //Apple.cs
??? public class Apple:Fruit
??? {
????public void grow()
????{
????Console.WriteLine(Apple is growing...);
????}
????public void harvest()
????{
????Console.WriteLine(Apple has been harvested.);
????}
????public void plant()
????{
????Console.WriteLine(Apple has been planted.);
????}
??? }
??? //Grape.cs
??? public class Grape : Fruit
??? {
????public void grow()
????{
????Console.WriteLine(Grape is growing...);
????}
????public void harvest()
????{
????Console.WriteLine(Grape has been harvested.);
????}
????public void plant()
????{
????Console.WriteLine(Grape has been planted.);
????}
??? }
??? //Strawberry.cs
??? public class Strawberry : Fruit
??? {
????public void grow()
????{
????Console.WriteLine(Strawberry is growing...);
????}
????public void harvest()
????{
????Console.WriteLine(Strawberry has been harvested.);
????}
????public void plant()
????{
????Console.WriteLine(Strawberry has been planted.);
????}
??? }
??? //AppleGardener.cs
??? public class AppleGardener : FruitGardener
??? {
????public Fruit Factory()
????{
????return new Apple();
????}
??? }
??? //StrawberryGardener.cs
??? public class StrawberryGardener : FruitGardener
??? {
????public Fruit Factory()
????{
????return new Strawberry();
????}
??? }
??? //GrapeGardene.cs
??? public class GrapeGardene : FruitGardener
??? {
????public Fruit Factory()
????{
????return new Grape();
????}
??? }
??? //Program.cs
??? class Program
??? {
????static void getFruit(FruitGardener master)
????{
????Fruit myfruit = master.Factory();
????myfruit.grow();
????myfruit.harvest();
????myfruit.plant();
????}
????static void Main(string[] args)
????{
????getFruit(new AppleGardener());
????getFruit(new GrapeGardene());
????getFruit(new StrawberryGardener());
????Console.ReadLine();
????}
??? }
}
強(qiáng)推





