Click here to Skip to main content

Design and Architecture

 
GeneralRe: Advice - WCF/MSMQ or Async TCP PinpremiumGer Hayden29-Aug-14 23:32 
Questionrich text editor PinmemberDanielos_s2330-Jan-13 10:03 
AnswerRe: rich text editor PinmemberJosé Amílcar Ferreira Casimiro11-Feb-13 5:37 
QuestionMVVM, EF and TDD tutorials Pinmembercansino17-Jan-13 6:06 
QuestionJava and C# operating on the same data in an ASP-based monitoring web application. PinmembervValkir17-Jan-13 0:18 
AnswerRe: Java and C# operating on the same data in an ASP-based monitoring web application. PinmemberJonathan C Dickinson17-Jan-13 3:05 
Questionindesign cs6 trial - no toolbar PinmemberMember 93448236-Jan-13 12:10 
AnswerRe: indesign cs6 trial - no toolbar PinprotectorPete O'Hanlon17-Jan-13 0:49 
QuestionHow do you design this? : with a better example PinmemberVuNic30-Dec-12 17:57 
AnswerRe: How do you design this? : with a better example PinmvpChristian Graus30-Dec-12 18:25 
GeneralRe: How do you design this? : with a better example PinmemberVuNic30-Dec-12 18:42 
GeneralRe: How do you design this? : with a better example PinmvpChristian Graus30-Dec-12 18:46 
AnswerRe: How do you design this? : with a better example Pinmemberjschell31-Dec-12 9:10 
AnswerRe: How do you design this? : with a better example PinmemberEddy Vluggen31-Dec-12 17:04 
Who fires? Is it the battleship, or the ammo that triggers? Anyway, I'd still resort to inheritance, as been said before;
    class BattleShip
    {
        void MountAndFire(AmmoBase ammo_in)
        {
 
            //if it's a gun,
            //int ammo_in.Fire(numberofrounds:30);  //returns remaining ammo

            // if it's a missle launcher:
            Fire(new FireArgsMissile { direction = 120, distance = 200 }); // return ammount of heat it generated on the ship

            //cluster bomb
            //  int ammo_in.Fire(Numberofcluster:600, direction:120, Distance:200);// Returns something else

        }
        int Fire(FireArgs a)
        {
            return a.Fire();
        }
 
    }
    public class FireArgs
    {
        public int Fire()
        {
            return 0;
        }
    }
    public class FireArgsMissile : FireArgs
    {
        public int direction { get; set; }
        public int distance { get; set; }
    }
 
    public abstract class AmmoBase
    {
        public abstract int Fire(FireArgs a);
    }
 
    public class Missile : AmmoBase
    {
        public override int Fire(FireArgs a)
        {
            return 0;
        }
    }
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

AnswerRe: How do you design this? : with a better example PinmemberKeld Ølykke16-Jan-13 11:23 
QuestionHow to find the similarity between users in Twitter ? How to design a good and efficient idea? Pinmemberldaneil27-Dec-12 7:26 
AnswerRe: How to find the similarity between users in Twitter ? How to design a good and efficient idea? PinprotectorPete O'Hanlon27-Dec-12 7:39 
GeneralRe: How to find the similarity between users in Twitter ? How to design a good and efficient idea? Pinmemberldaneil27-Dec-12 7:50 
AnswerRe: How to find the similarity between users in Twitter ? How to design a good and efficient idea? Pinmemberjschell27-Dec-12 9:21 
GeneralRe: How to find the similarity between users in Twitter ? How to design a good and efficient idea? Pinmemberldaneil28-Dec-12 8:31 
AnswerRe: How to find the similarity between users in Twitter ? How to design a good and efficient idea? [modified] PinmemberApril Fans27-Dec-12 15:43 
GeneralRe: How to find the similarity between users in Twitter ? How to design a good and efficient idea? Pinmemberldaneil28-Dec-12 8:36 
GeneralRe: How to find the similarity between users in Twitter ? How to design a good and efficient idea? [modified] PinmemberApril Fans3-Jan-13 16:46 
AnswerRe: How to find the similarity between users in Twitter ? How to design a good and efficient idea? PinprofessionalMarc Koutzarov29-Aug-14 23:54 
QuestionClient - Server approach Pinmemberbugal21-Dec-12 0:33 
AnswerRe: Client - Server approach Pinmemberjschell22-Dec-12 14:11 
QuestionHow do you design this ? PinmemberVuNic18-Dec-12 2:33 
AnswerRe: How do you design this ? PinprotectorPete O'Hanlon18-Dec-12 2:47 
GeneralRe: How do you design this ? PinmemberVuNic18-Dec-12 2:54 
GeneralRe: How do you design this ? PinprotectorPete O'Hanlon18-Dec-12 3:02 
GeneralRe: How do you design this ? PinmemberLampridis Vasilis30-Dec-12 0:04 
GeneralRe: How do you design this ? PinmemberVuNic30-Dec-12 18:00 
AnswerRe: How do you design this ? Pinmemberjschell18-Dec-12 8:14 
GeneralPlease hold on PinmemberVuNic18-Dec-12 18:59 
GeneralRe: How do you design this ? PinmemberVuNic30-Dec-12 17:59 
GeneralRe: How do you design this ? Pinmemberjschell31-Dec-12 9:12 
Questionportability/deployment PinmemberMember 838594911-Dec-12 4:39 
AnswerRe: portability/deployment Pinmemberjschell11-Dec-12 10:07 
AnswerRe: portability/deployment PinmemberMycroft Holmes16-Dec-12 11:59 
GeneralRe: portability/deployment Pinmemberjschell17-Dec-12 8:40 
Question.NET vs WINRT on Windows 8 [modified] Pinmemberdevvvy9-Dec-12 15:13 
AnswerRe: .NET vs WINRT on Windows 8 PinmvpRichard MacCutchan9-Dec-12 22:12 
GeneralRe: .NET vs WINRT on Windows 8 Pinmemberdevvvy10-Dec-12 2:52 
AnswerRe: .NET vs WINRT on Windows 8 PinmemberEddy Vluggen9-Dec-12 22:42 
GeneralRe: .NET vs WINRT on Windows 8 Pinmemberdevvvy10-Dec-12 2:53 
GeneralRe: .NET vs WINRT on Windows 8 PinmemberEddy Vluggen10-Dec-12 3:05 
GeneralRe: .NET vs WINRT on Windows 8 Pinmemberdevvvy10-Dec-12 3:08 
GeneralRe: .NET vs WINRT on Windows 8 PinmemberEddy Vluggen10-Dec-12 3:11 
AnswerRe: .NET vs WINRT on Windows 8 PinmemberRobb Ryniak10-Dec-12 2:14 
GeneralRe: .NET vs WINRT on Windows 8 Pinmemberdevvvy10-Dec-12 3:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 31 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid