Search Results

Search found 55521 results on 2221 pages for 'class design'.

Page 10/2221 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Question about casting a class in Java with generics

    - by Florian F
    In Java 6 Class<? extends ArrayList<?>> a = ArrayList.class; gives and error, but Class<? extends ArrayList<?>> b = (Class<? extends ArrayList<?>>)ArrayList.class; gives a warning. Why is (a) an error? What is it, that Java needs to do in the assignment, if not the cast shown in (b)? And why isn't ArrayList compatible with ArrayList? I know one is "raw" and the other is "generic", but what is it you can do with an ArrayList and not with an ArrayList, or the other way around?

    Read the article

  • Java code generation from class diagram

    - by Sanjay
    I'm on the way developing a Java application where user can provide a class diagram and get the corresponding Java code. I don't know how can I let the user interactively draw a class diagram in Java. I am currently getting the required parameters like attributes, functions directly from the user, and then I render a class diagram for him. I show the class diagram on a jdialog. Is there a better way to do this? This is an example of a class diagram, I need to generate this from a Java program, given the values and relationship.

    Read the article

  • Level Design V.S. Modeler

    - by Ecurbed
    From what I understand being a level designer and a character/environment/object/etc Modeler are two different jobs, yet sometimes it feels like a Modeler can also do the job of the level designer. I know this also depends on the scale of the game. For small games maybe they are one and the same, but for bigger games they become two different jobs. I understand a background in some modeling could not hurt when it comes to level design, but the question I have is: Do jobs prefer people who can model for level designing? This way they can kill two birds with one stone and have someone to create the assets and design the level. What is your opinion of the training? Does level design contain skill sets that make them completely different from what a modeler can do, or is this an easy transition for a modeler to become a level designer? Can you be a bad level designer but a good modeler and vice versa?

    Read the article

  • How to design network protocols

    - by dandroid
    As a programmer, you work on your software design skills. You learn about things such as modularity and reusability and how you can achieve them in code. There's plenty of literature on the subject and engineers talk about it all the time. What about if you want to design network protocols? How do you judge that protocol X is badly designed while Y is well designed? (eg. in programming you are often pointed out to a well-written piece of code in order to learn from it - what is the equivalent for network protocols?) For example, suppose I want to design a P2P protocol similar to BitTorrent or I want to make a better version of the Socks protocol. How would I go about doing a good job on this? Thanks!

    Read the article

  • Green Website Design

    - by Christofian
    This is kindove a strange question, but... There was a site called Blackle ( http://www.blackle.com/) which "claimed" to save energy by using a black background (it doesn't: see here: http://skeptics.stackexchange.com/questions/4373/how-much-energy-does-displaying-a-webpage-with-a-black-background-actually-save). However, blackle and it's idea of "green website design" interested me, and I was wondering if there are any ways to design an energy saving website that actually save energy. If anyone knows of any, please post them here. If nobody has any, then I guess there isn't a way to save energy through website design...

    Read the article

  • Advice about a website design [closed]

    - by Dimitri
    I am web developer newbie. It doesn't mean that I don't know html/css/javascript but I am not good for web design. I am making a website for friend about a barber shop but I am not totally happy of my work due to lack of design. I would like to have some advice about the website and how can I improve the design? The website is in french because i am french. Here is the website : http://afrostyle92.fr/.

    Read the article

  • Custom Logo Design - or - Free Logo Design

    When you search the web, you will be able to find unlimited companies and websites offering free services. Even though they brag about providing quality products, but you can never be sure how useful... [Author: Sha Amen - Web Design and Development - May 07, 2010]

    Read the article

  • Right multi object dependance design

    - by kenny
    I need some help with a correct design. I have a class called BufferManager. The push() method of this class reads data from a source and pushes it to a buffer repeatedly until there is no more data left in the source. There are also consumer threads that read data from this buffer, as soon as new data arrives. There is an option to sort the data before it comes to buffer. What I do right now is that BufferManager, instead of pushing data to the buffer, pushes it to another "sorting" buffer and starts a sorting thread. SorterManager class reads the data, sorts it in files and push()es the sorted data into the buffer. There will be a bottleneck (I use merge sort with files) but this is something I can't avoid. This is a bad design, because both BufferManager and SorterManager push data to a buffer (that consumers read from). I think only BufferManager should do it. How can I design it?

    Read the article

  • Software Architecture - From design to sucessful implementation

    - by user20358
    As the subject goes; once a software architect puts down the high level design and approach to a software that is to be developed from scratch, how does the team ensure that it is implemented successfully? To my mind the following things will need to be done Proper understanding of requirements Setting down coding practices and guidelines Regular code reviews to ensure the guidelines are being adhered to Revisiting the requirements phase and making necessary changes to design based on client inputs if there are any changes to requirements Proper documentation of what is being done in code Proper documentation of requirements and changes to them Last but not the least, implementing the design via object oriented code where appropriate Did I miss anything? Would love to hear any mistakes that you have learned from in your project experiences. What went wrong, what could have been done better. Thanks for taking the time..

    Read the article

  • SSIS Design Pattern: Producing a Footer Row

    - by andyleonard
    The following is an excerpt from SSIS Design Patterns (now available in the UK!) Chapter 7, Flat File Source Patterns. The only planned appearance of all five authors presenting on SSIS Design Patterns is the SSIS Design Patterns day-long pre-conference session at the PASS Summit 2012 . Register today . Let’s look at producing a footer row and adding it to the data file. For this pattern, we will leverage project and package parameters. We will also leverage the Parent-Child pattern, which will be...(read more)

    Read the article

  • Design Patterns for these scenarios

    - by user1899749
    Please help me to find design patterns for following situations. Situation 1: how can a smart robot use Wi-Fi? Situation 2: How can a Smart robot automatically go to rechargeable unit while there is no remote signal? Situation 3: Voice recognition component (If homeowner itself at home and motion detection is off then how can Smart Robot voice recognition component will recognize those very sensitive sentences) Situation 4: Motion detection component (How can Smart Robot send video stream on cell phone while homeowner/resident driving) I am looking for the design patterns for above Situations to answer following question. if not using design patterns, then what’re the difficulties?

    Read the article

  • Switching from abstract class to interface

    - by nischayn22
    I have an abstract class which has all abstract methods except one which constructs objects of the subclasses. Now my mentor asked me to move this abstract class to an interface. Having an interface is no problem except with the method used to construct subclass objects. Where should this method go now? Also, I read somewhere that interfaces are more efficient than abstract classes. Is this true? Here's an example of my classes abstract class Animal { //many abstract methods getAnimalobject(some parameter) { return //appropriate subclass } } class Dog extends Animal {} class Elephant extends Animal {}

    Read the article

  • Design Expert Tips by Specialized Web Design Firm

    The World Wide Web is one of the fastest growing marketplaces, with thousands of companies launching their websites daily! So how do you get your website noticed and achieve higher rankings in search... [Author: Alan Smith - Web Design and Development - June 04, 2010]

    Read the article

  • Is it possible to outsource design properly?

    - by Eric
    I work in a company going through a downsizing process. It is assumed that a lot of "let go" developers jobs will eventually be outsourced. Some of those programmers had some design to do. Is it possible to outsource both design and creation/coding properly? I feel that by outsourcing design, we lose any in-house capability of really "owning" the code. It will be very difficult to maintain. Also we'll have a hard time ensuring a proper development. How can I address those issues?

    Read the article

  • Most appropriate diagram for GUI button design?

    - by JustADude
    What is the most appropriate diagram for GUI button design? Specifically, I have numerous buttons that will be changing color based on state information from operator input and input from various subcomponents and sensors. I would like to use UML or some other type of design diagrams to be able to capture the color transition. Some folks have suggested sequence diagrams, but I haven't been able to find any good examples that show how to incorporate this design artifact. I would really like to head in this direction to help developers. Thanks a ton for feedback and insights.

    Read the article

  • Should we design programs to randomly kill themselves?

    - by jimbojw
    In a nutshell, should we design death into our programs, processes, and threads at a low level, for the good of the overall system? Failures happen. Processes die. We plan for disaster and occasionally recover from it. But we rarely design and implement unpredictable program death. We hope that our services' uptimes are as long as we care to keep them running. A macro-example of this concept is Netflix's Chaos Monkey, which randomly terminates AWS instances in some scenarios. They claim that this has helped them discover problems and build more redundant systems. What I'm talking about is lower level. The idea is for traditionally long-running processes to randomly exit. This should force redundancy into the design and ultimately produce more resilient systems. Does this concept already have a name? Is it already being used in the industry?

    Read the article

  • Are sequence designs appropriate for GUI button design?

    - by JustADude
    Specifically, I have numerous buttons that will be changing color based on state information from operator input and input from various subcomponents and sensors. I would like to use UML or some other type of design diagrams to be able to capture the color transition. Some folks have suggested sequence diagrams, but I haven't been able to find any good examples that show how to incorporate this design artifact. I would really like to head in this direction to help developers. Are sequence designs in fact, appropriate, or is there a more appropriate design?

    Read the article

  • C# Cast Class to Overridden Class

    - by Nathan Tornquist
    I have a class Application that I need to override with INotifyPropertyChanged events. I have written the logic to override the original class and ended up creating SuperApplication I am pulling the data from a library though, and cannot change the loading logic. I just need a way to get the data from the original class into my superClass. I've tried things like superClass = (SuperApplication)standardClass; but it hasn't worked. How would I go about doing this? If it helps, this is the code I'm using to override the original class: public class SuperCreditApplication : CreditApplication { public SuperCreditApplicant Applicant { get; set; } public SuperCreditApplicant CoApplicant { get; set; } } public class SuperCreditApplicant : CreditApplicant { public SuperProspect Prospect { get; set; } } public class SuperProspect : Prospect, INotifyPropertyChanged { public State DriverLicenseState { get { return DriverLicenseState; } set { DriverLicenseState = value; OnPropertyChanged("DriverLicenseState"); } } public event PropertyChangedEventHandler PropertyChanged; private void OnPropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } }

    Read the article

  • C++ Using a class from a header within a class

    - by Kotsuzui
    I'm having a bit of trouble with classes used within classes, from header files. I have an class time in time.h: class Time { private: int hour, second, minute; public: . . . int getHour(int h); etc. setHour(); etc. void print24hour(); // Prints time in 24 hour format } And then, main.cpp: #include "time.h" class Class { private: string name; double grade; Time startTime; Time endTime; public: Class(); ~Class(); void setName(); void setGrade(); etc. } int main() { //Need to print time in 24 hour format, but I don't know how. class[i].startTime.print24(getStartTime()); // ??? I'm rather lost } I get quite a few "hour, second, minute, etc." are private errors, I'm guessing I'm doing something simple in a rather wrong way. Please help.

    Read the article

  • Application Design: Single vs. Multiple Hits to the DB

    - by shyneman
    I'm building a service that performs a set of configured activities based on the type of request that it receives. Each activity involves going to the database and retrieving/updating some kind of information. The logic for each activity can be generalized and re-used across different request types. The activities may need to participate in a transaction for the duration of the servicing the request. One option, I'm considering is having each activity maintain its own access to DAL/database. This fully encapsulates the activity into a stand-alone re-usable piece, but hitting the database multiple times for one request doesn't seem like a viable option. I don't really know how to easily implement the concept of a transaction across the multiple activities here either. The second option is to encapsulate ALL the activities into one big activity and hit the database once. But this does not allow re-use and configuration of these activities for different requests. Does anyone have any suggestions and input about what should be the best way to approach my problem? Thanks for any help.

    Read the article

  • Avoiding the Anaemic Domain - How to decide what single responsibility a class has

    - by thecapsaicinkid
    Even after reading a bunch I'm still falling into the same trap. I have a class, usually an enity. I need to implement more than one, similar operations on this type. It feels wrong to (seemingly arbitrarily) choose one of these operations to belong inside the entity and push the others out to a separate class; I end up pushing all operations to service classes and am left with an anaemic domain. As a crude example, imagine the typical Employee class with numeric properties to hold how many paid days the employee is entitled to for both sickness and holiday and a collection of days taken for each. public class Employee { public int PaidHolidayAllowance { get; set; } public int PaidSicknessAllowance { get; set; } public IEnumerable<Holiday> Holidays { get; set; } public IEnumerable<SickDays> SickDays { get; set; } } I want two operations, one to calculate remaining holiday, another for remaining paid sick days. It seems strange to include say, CalculateRemaingHoliday() in the Employee class and bump CalculateRemainingPaidSick() to some PaidSicknessCalculator class. I would end up with a PaidSicknessCalculator and a RemainingHolidayCalculator and the anaemic Employee entity as seen above. The other alternative would be to put both operations in the Employee class and kick Single Responsibility to the curb. That doesn't make for particularly maintainable code. I suppose the Employee class should have some initialisation/validation logic (not accepting negative alowances etc.) So maybe I just stick to basic initialisation and validation in the entities themselves and be happy with my separate calculator classes. Or maybe I should be asking myself if Anaemic Domain is actually causing me some tangible problems with my code.

    Read the article

  • abstract class extends abstract class in php?

    - by user151841
    I am working on a simple abstract database class. In my usage of this class, I'll want to have some instance be a singleton. I was thinking of having a abstract class that is not a singleton, and then extend it into another abstract class that is a singleton. Is this possible? Recommended?

    Read the article

  • Deriving a class from an abstract class (C++)

    - by cemregoksu
    I have an abstract class with a pure virtual function f() and i want to create a class inherited from that class, and also override function f(). I seperated the header file and the cpp file. I declared the function f(int) in the header file and the definition is in the cpp file. However, the compiler says the derived class is still abstract. How can i fix it?

    Read the article

  • Designing a class in such a way that it doesn't become a "God object"

    - by devoured elysium
    I'm designing an application that will allow me to draw some functions on a graphic. Each function will be drawn from a set of points that I will pass to this graphic class. There are different kinds of points, all inheriting from a MyPoint class. For some kind of points it will be just printing them on the screen as they are, others can be ignored, others added, so there is some kind of logic associated to them that can get complex. How to actually draw the graphic is not the main issue here. What bothers me is how to make the code logic such that this GraphicMaker class doesn't become the so called God-Object. It would be easy to make something like this: class GraphicMaker { ArrayList<Point> points = new ArrayList<Point>(); public void AddPoint(Point point) { points.add(point); } public void DoDrawing() { foreach (Point point in points) { if (point is PointA) { //some logic here else if (point is PointXYZ) { //...etc } } } } How would you do something like this? I have a feeling the correct way would be to put the drawing logic on each Point object (so each child class from Point would know how to draw itself) but two problems arise: There will be kinds of points that need to know all the other points that exist in the GraphicObject class to know how to draw themselves. I can make a lot of the methods/properties from the Graphic class public, so that all the points have a reference to the Graphic class and can make all their logic as they want, but isn't that a big price to pay for not wanting to have a God class?

    Read the article

  • adhoc struct/class in C#?

    - by acidzombie24
    Currently i am using reflection with sql. I find if i want to make a specialize query it is easiest to get the results by creating a new class inheriting from another and adding the 2 members/columns for my specialized query. Then due to reflections in the lib in my c# code i can write foreach(var v in list) { v.AnyMember and v.MyExtraMember) Now instead of having the class scattered around or modifying my main DB.cs file can i define a class inside a function? I know i can create an anonymous object by writing new {name=val, name2=...}; but i need a to pass this class in a generic function func(query, args);

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >