using System; using System.Collections.Generic; using System.Text; namespace SimplePrinter { /// /// Class that describes a printer. /// public class Printer { //******************************************************** // Printer.A //******************************************************** /// /// Enumeration of printer types. Can select one per printer. /// public enum PrinterEnum { Laser, Inkjet, DotMatrix, Line, Thermal, Other }; //******************************************************** // Printer.B //******************************************************** /// /// Enumeration of printer attachment types. Can specify /// multiple attachment types for a printer. /// [FlagsAttribute] public enum AttachmentEnum { None = 0, BlueTooth = 1, LAN = 2, Parallel = 4, USB = 8 }; //******************************************************** // Printer.C //******************************************************** private PrinterEnum type; /// /// The type of the printer. /// public PrinterEnum Type { get { return type; } set { type = value; } } private AttachmentEnum attachment; /// /// The printer attachment type. /// public AttachmentEnum Attachment { get { return attachment; } set { attachment = value; } } //******************************************************** // Printer.D //******************************************************** /// /// Constructor for printer type and attachment type. /// /// /// The type of the printer. /// /// /// The attachment type. /// public Printer(PrinterEnum Type, AttachmentEnum Attachment) { this.type = Type; this.attachment = Attachment; } } }