How much functionality in constructor?

Hi
Lets say I have a class 'schedule' which builds a schedule from a set of data
and then holds that schedule for further processing.
Which of these two options is better designed?:
public class Schedule
     public Schedule(SomeInputs inputs)
          buildSchedule(inputs);
     private buildSchedule(SomeInputs inputs)
          //Schedule is initialized here
     public void doOtherStuffWithSchedule()
}or this :
public class Schedule
     public Schedule()
     public buildSchedule(SomeInputs inputs)
          //Schedule is initialized here
     public void doOtherStuffWithSchedule()
}The first version is simpler to use but the second seems intuitively to make more sense.
Is there a standard that talks about this?
Thanks guys

Aharon wrote:
Actually I think you've touched on my problem more clearly,
ALL the Schedule class does is build a schedule from a complete set of input data (using the buildSchedule method)
and then afterwards it stores this schedule in a database (using the doOtherStuffWithSchedule() method in our example).
Your definition sounds like a DAO
So essentially I could just stick the second db storage method also into the constructor and with that my class would have no public methods, One would just instantiate the class and finished. This just doesn't seem logical to me, should I rather use static methods and no instantiation at all?
Or maybe two classes: One for the Schedule object and another class for a ScheduleFactory object which statically builds schedules. Although I don't like this since surely a class should be in charge of its own data according to OO?
More than anything that probably depends on size. Is there 100 lines, 1000 lines or 10,000 lines of code. If the first then realistically it doesn't matter. If the last then something is probably wrong with the design.
Despite the fact that OO is useful that doesn't alter the fact that there are tasks that lend themselves better, especially for maintenance, to a procedural approach.

Similar Messages

  • Exporting CP 5 to PDF - how much functionality should I expect?

    Hello,
    I've been reading the Captivate forum for hours and I've learned so much, thank you to all the awesome contributors. However, either I'm missing something or I'm trying to do something stupid that has a better solution. Anyway, I need to export a CP 5 project to pdf, and view it with Adobe Reader 9 or 10. It's working great EXCEPT - external links won't work (I posted a question on that yesterday and a reply said "they are aware of it and are working on it"). Also, I discovered today that highlight boxes won't show up in the pdf either (certainly not the end of the world). Am I just barking up the wrong tree here? Is it silly to try and export CP to pdf? I thought it was going to be the best thing since...yea, sliced bread. Now I think I'm just being thick-headed and there is an obvious, easier way to do things...Didn't CP4 have the export to pdf option? Is it really that new that it doesn't work? If anyone can even help me have a better perspective on this whole thing, even if you don't have a solution to the problem, I would be very grateful. It's either run out of trial time or pay $800. Which will it be???? Yikes. Advice? THANKS!

    Hi
    You are very patient and helpful and I am grateful.
    Regarding *Issue 1: PDF
    Thank you for the thorough workaround. I apologize for not providing all pertinent information. The customer wants a standalone pdf on a CD. Therefore, I can't resort to hosting the files on a web server. Here is more information about my project. I am creating 4 lesson modules for middle school science. Each lesson module lives on its own CD. Each module consists of about 15 lessons. Each lesson is a separate captivate project (or, I might get cute and create one big branching project for the whole module). I am using CP 5 (is that the correct abbreviation?) on a Mac OS X running 10.6.5. Each lesson has about 20 slides, including 10 quiz slides. At certain points in the presentation, a student is asked to click a button to open a small pdf that is an activity, a practice worksheet, or a text piece. Everything is colorful and snazzy and the little pdfs have the text entry boxes so they can type in answers and save their work, or print out the pdf and use a pencil. None of the lessons will be linked with LMS. I instruct the user that the lesson module must be opened with acrobat reader 9 or X. I am actually testing everything with reader X.
    I used to create these lesson modules by using a combination of PP, acrobat 9 pro extended, flash movies, flash animations, and a couple of converters here and there. By trying captivate this week, I discovered that I can produce things that look better and take half the time. Except for the fact that I can't get the external links to open when I export to pdf. That's where I'm stuck. Perhaps, since CP is geared toward web hosting content, I need to look for a different tool. Help?  Wouldn't I love to just publish to the customer's website and that would open up lots of fun possibilities! But alas, there are still schools in these great United States that have unreliable internet access, overworked and under-resourced IT departments, etc. That is what I am up against.
    OH - one more piece of information. I create the reading, activity, and worksheet pieces in InDesign and save them as pdfs. I've only been using iD for a few months, I love it. I was a long-time framemaker user. Actually, seems like close to forever. I still have to use frame a little longer for some things while customer transitions to iD.
    Regarding *Issue 2: Highlight box not showing up
    Mac 10.6.5
    highlight box settings:
    No highlight box showing up in SWF or HTML
    Acrobat Reader X
    Note: I set the display time and appear after time by sliding the highlight box to the right place in the timeline where it matches the narration. I used to use final cut pro a lot and I love using the timeline in captivate. Previously, I had to go through all kinds of gyrations to sync narration with animated text like highlight boxes...
    Finally, I would like to say again how much I appreciate your help. This forum has taught me a lot in a very short period of time. Two thumbs up!
    Best,
    Peezer

  • HT1766 Restore backup function says there is not enough space on my iPhone to restore backup. How do I fix this/how do I know how much space I need on my iPhone?

    My family member's iPhone recently erased all of its contact information, with no action taken by my family member. She is trying to use the restore backup function to recover her contacts.
    The restore backup functions says that there is not enough space on my iPhone to restore backup. How do I fix this/how do I know how much space I need to complete this backup?
    We have removed the majority of pictures from her phone, and she has 4.1 GB of memory free.
    Thank you!

    You need at least as much space as you have used on the iPod. Could be as much as 64 GB but is probably much less.
    Find a way to delete what you do not need on the computer. Start by emptying the Recycle Bin.
    This may be applicable: iOS: 'Not enough free space' alert when trying to sync

  • I bought an iPhone 4s in u.s....and accidentally it got wet inthe rain now it does function at all..i gave it in apple india and they checked and said that it cant be repaired..can i get a replacement in u.s..how much will it cost??

    I bought an iPhone 4s from Chicago last year and it got wet in the rain.I gave it here in india to apple..they said it can't be repairedand replaced can I get a replacement in u.s.  how much will it cost?will they refuse because the phone was opened?

    http://www.apple.com/support/service/
    Out-of-Warranty Service
    If you own an iPhone that is ineligible for warranty service but is eligible for Out-of-Warranty (OOW) Service, Apple will service your iPhone for the Out-of-Warranty Service fee listed below.
    iPhone model
    Out-of-Warranty Service
    iPhone 5
    $229
    iPhone 4S
    $199
    iPhone 4, iPhone 3GS,
    iPhone 3G, Original iPhone
    $149
    A $6.95 shipping fee will be added if service is arranged through Apple and requires shipping. All fees are in U.S. dollars and are subject to local tax. "

  • How Much free space does the iPod touch need to function properly?

    I'm just curious. Lets say i filled my IPod touch(8gb) to the brim (which is 6.4 GB), would it lag to death??
    Also, how much ram do IPods have??

    If you do run out of Space, you will get an alert when syncing...
    'Not enough free space' alert when trying to sync
    From Here
    http://www.apple.com/support/ipodtouch/syncing/
    Hope this Helps, Cheers.

  • Bartab extension - how much of this function is implemented in FF6?

    I abso LOVED Bartab so much I'm thinking about DOWN-GRADING Firefox to v.3 to use it. I'm at v.5 now.
    Bartab does not "open" restored tabs until clicked on. Tabs go to sleep automatically after X minutes, or can be put to sleep manually.
    Are these features in FF6? Can they be implemented in About:config? FF5 implements this partially, by keeping tabs "inactive" or "unloaded" on restore, until I click on them.

    Are you able to use the command line version of ttSize instead? This splits out how much space is being used by indexes (in the Temp section of the TT memory segment), which I think is being combined into one, whole figure in the procedure version of ttSize you're using. For example:
    ttSize -tbl ia my_ttdb
    Rows = 4
    Total in-line row bytes = 17524
    Total = 17524
    Command> create index i1 on ia(a);
    ttSize -tbl ia my_ttdb;
    Rows = 4
    Total in-line row bytes = 17524
    Indexes:
    Range index JSPALMER.I1 adds 5618 bytes
      Total index bytes = 5618
    Total = 23142
    Command> call ttsize ('ia',,);
    < 23142.0000000000 >
    1 row found.
    In 11.2.2 we added the procedure ttComputeTabSizes which populates system tables with detailed table size data, and was designed to be an alternative to ttSize. Unfortunately it still doesn't calculate index usage though, and it isn't in 11.2.1.

  • How much memory do Objects use?

    I'm not sure how to ask this, but how does java manage memory usage for multiple objects? Is the memory needed for a classes methods shared amongst the objects of that class, or does each object have memory for it's methods allocated for its use alone?
    For example:
    class Foo {
       public void doSomething();
    }Let's say I have 30 instances of Foo. I can think of 2 options (but I maybe wrong)
    Case A: Each instance of Foo has it's own memory allocated for it's own copy of doSomething(), resulting in the total memory
    usage of 30 instances of Foo being about 30 times how much memory 1 Foo uses
    Case B: Each instance of Foo looks at a common copy of doSomething(), resulting in less memory needed since there is only one copy of doSomething in memory.
    If the case is A, Static methods would seem to be potentially more memory efficient. Assuming my thinking is correct(and feel free to say I'm dead wrong), would it not make sense to make as many functions as possible static?

    jverd wrote:
    Executable code (initializers, methods, constructors): One copy of the bytecodes per ClassLoader that loads the class. Static/non is irrelevant.Seems to answer the question in full.
    With reference (no pun intended) to the subject.
    Instance variables (non-static member variables): One copy of the variable per instance of the class. Stored on the heap.
    Class variables (static member variables): One copy of the variable per ClassLoader that loads the class. Stored on the heap.
    Local variables, including parameters: One copy of the variable per invocation of the method.Just to complete the picture a bit (but NOT to contradict earlier comments).
    Primitive variables - as above.
    Reference variables - as above. Note that method local reference variables are stored on the stack but
    any object instances referenced by these are stored on the heap even so.

  • How Much To Set Up A Company, How Much To Set Up A Limited Company

    Market specialists stated, find enormous opportunities associated with Fb shoulds 't be impaired go after pluralism, should certainly still concentrate on key enterprise in order to Yahoo release potent concern.
    Despite the fact that about Fb Boss How Much To Set Up A Limited Company Level ??? Level Zuckerberg hochfrequenztechnik zack () feasible actions in the future got various suggestions, most of this marketplace colleagues consider, zack sulzberger must not without research going after diverse.
    Researching the market company Forrester specialists augean Lewis (Augie Lewis), "said Fb should stay away from as the level is big and it has a tremendous income hazards. However in numerous career fields offers put in greatly seems really interesting, yet Fb should still concentrate on the within personal talk about, cultural along with marketing and sales communications facets of the particular key worth.Inch
    Advertising accounts explained Wednesday about Fb, Goldman sachs purchase $450 trillion, values with regard to $50 thousand. Russian federation purchase firm DST more people $50 trillion purchase.
    Gabriel advisory class professional Serta otzi (Serta, explained Fb Olds) really worth is booming, "if about Fb values associated with precise, meaning the really worth over the particular topline from the Forty instances, in the present atmosphere, this particular rate is actually high".
    Researching the market company Enderle Team specialists shedd towel, nordex sahbaz associated with ullage Enderle) explained, zack sulzberger should certainly properly help save an excellent a part of brand new elevate resources, while he has to utilize the resources concern Yahoo.
    Fb along with Yahoo between your significantly ferocious levels of competition, both the firms will be the innovator with their individual places, more vital is actually, these people wish to turn into cultural Net discipline business. Yahoo offers allegedly are generally establishing their unique websites.
    Nordex the, "said the brand new must use any Fb boosting resources concern Yahoo. Boost existing property income-producing potential, reduce Yahoo within cultural Net discipline in order to make money, help the services associated with sticky needs to be sensible purchase method.
    Upon Wednesday, an investigation claims Fb achievement via Goldman sachs along with Russian federation purchase firm DST funding $500m, used by more enlargement. The other day, Groupon on the investments along with change fee (Securities and exchange commission) filings propose, offers received Five thousand us dollars purchase, doing the brand new spherical Ten thousand funding 50 percent.
    Renaissance are generally second in command along with Initial public offering specialists Bard Wednesday meeting with regard to, "said Fb is the alluring placement, people are prepared to that anytime in order to chuck income.Inch Your professional included, the latest funding will not likely alter the Initial public offering prepare. Fb The corporation promises to personal the Initial public offering deceptive along with leader indicate -- zack sulzberger these days short-term first showed within about lately detailed declines.
    Pertaining to Bard claims, "we trust the conclusion associated with This year May well Fb software sent in Initial public offering, so that the organization will likely be placed in earlier Next year.Inch He or she is supposed to Groupon could have much the same detailed schedule. Accounts state Groupon offers declined research huge Yahoo Sixty thousand takeover bet.
    Pertaining to Groupon Bard claims Fb is extremely involved just with in which you firm, far wall from the social media website includes enterprise LinkedIn, cultural online game builders Facebook and internet based paid dating sites eHarmony and so forth, people to the telltale internet sites really curious. Pertaining to Bard claims, The year of 2010 the particular Initial public offering industry functionality demonstrated that people purchase increasing requirement for these types of high-speed growth firm excited.
    Given that absolutely no detailed, the organization don't need to encounter via investors associated with force. To maintain fast development, the particular Fb is constantly on the try out brand new career fields, for example brand new Advert formatting. Even so, there are other plus much more people with the extra industry SharesPost and so forth SecondMarket and buying Fb as well as other individual gives within the firm.
    Throughout SharesPost, customers about Fb newest bet offers arrived at $40 for each talk about in order to $50. The other day, options explained the us investments along with change fee initiated a policy of looking into Fb and so forth gives from the firm within the extra industry financial transaction. In case Fb investor over 400 folks, Securities and exchange commission may require firm general public monetary info.
    Fb along with How Much To Set Up A Company Groupon this kind of firm can draw in plenty of individual money to stop Initial public offering. In a nutshell, The year of 2010 wind flow forged assist firm within the Initial public offering industry functionality improved upon. Your dow jones Smith VentureSource Wednesday explained very last Forty six leveraging the particular forged from the firm offers funding assist $3.Four thousand, Last year simply 7 upwards industry funding Nine.Walk thousand us dollars.

    Myrphy's computer-law §1: Never change a running Windows
    The time between installation and update after three years is a too long period. Drivers and tools had changed extensive.
    In the case like this very often it will be the best way to leave the drivers and tools untouched until a new installation of the computer.
    Otherwise sometimes the software prerequisits may have been changed that additional packets need to be installed (f.ex. Microsoft .NET Framework 3.5). It is also recommended, to remove the old driver/software before installing the update. Very often it might help to read the installation instructions on the download pages concerning "Update install".
    My home-forum: http://www.thinkpad-forum.de
    Wiki: Deutsches ThinkPad-Wiki English ThinkWiki
    My ThinkPad-Collection

  • I have an iPhone 5S, with iOS 8.1.2  I am trying to do a system restore but the message I get on the desktop is that there is not enough room on the iPhone. How much room is required?

    I have an iPhone 5S, with iOS 8.1.2  I am trying to do a system restore but the message I get on the desktop is that there is not enough room on the iPhone. How much room is required?
    I had an important app. (Memos by bluemarblesoftware.com) that I accidentally deleted. It of course had many memos, some with quite a lot of information. I did sync my phone on a regular basis and I think the memos should be on the desktop computer. I tried to do a restore function but I got a message saying there was not enough room on the iPhone. How much room is needed?

    generally you need 1.90gb
    what you can do is back up your phone to your computer before doing the update, just as a precaution.

  • Need to find out how much % of query completed from OEM

    Need to find out how long will a query take to run or when I am running the query where can I check to see that X% of my query is complete.
    Is that % shown on OEM --> Performance --> Top Activitity?

    Under OEM/GC of release 10g you won't be able to see how long the query will take neither how much % of a query are already finished.
    I know that this functionality was given in the old release of the OEM (javas based GUI with ll the databases on the left side). I'm missing
    that old functionality, too...

  • Is there a plug-in that tracks how much time you've spent in specific files?

    I want an easy way to track how much time I've spent on certain projects. I really just need a plug-in that tracks how long files have been open. I'm having trouble searching for one like that; does anyone know if this exists as a plug-in or even as a function of Photoshop (or Illustrator)? This would be very helpful for freelancers. Thanks.

    Found this link via Google. I have CS6 and it looks like this, don't know about CC.
    How to Keep a Log of Your Work in Photoshop - Digital Photography School

  • How much performance do I gain by enable MAT

    Hi
    I must try to ask you guys before am try to enable MAT
    I have never entered the bios before so am a little scared that I will f-up the system.
    Do anybody here at this forum with similar memory and componemts have tryed to this MAT function.
    Must it be "Turbo" or "Ultra turbo" to activate MAT?
    How much performance do I gain by this.....do I notice it in games....Battlefield 1942 for an example..or?
    If the system do not like it...what happens, shutdown or? unstable?
    Please give some advice.
    Mr Lithesteel

    MAT will give you at least a 5% increase in memory bandwidth when set to turbo mode regardless of the brand of memory you have. I own a pair of generic value ram and i see an increase of around 5 to 10 percent memory bandwidth when turbo mode is on, however my sytem fails to boot when MAT is set to ultra turbo, try to mess with the bios so you could figure out the best configuration of your system (you could measure memory bandwidth with sisoft sandra http://www.sisoftware.co.uk/), By the way your system is prepped up for hyperthreading, you own an 865pe which means your board is ready for hyperthreading, now unless you own the first generation of pentium4 procs which does not support ht, you are all set to run with hyperthreading, it would be nice if you upgrade to win xp pro or at least win2k so that you would be able to maximize your system's potential, Win XP home edition  does not support multi-threading so youre loosing a lot of performance with it. Hope i helped you with your question.

  • How much do I charge to design a co-worker's website for a starter business?

    I'm not a web-designer - I'm an architect (or will be). But I got into graphic design a little, and just recently web-design. To be honest, it all seems to be coming naturally, and I just finished recreating the company-site of the place I work, and my own portfolio-site...
    Now - a coworker wants a website for a small business he's starting up. I want to help him, but don't have the time to volunteer my services. And neither of us wants to throw out a price offer, because we don't want to offend one another..
    So what's reasonable? We're both fresh out of school with a mountain of student loans each - I need money, and he has little to spend.
    1) do I charge hourly or as a flat-price?
    2) how much is reasonable for: a simple 5-page (or so) design, with a flash intro, custom-animated flash buttons (as links), a slideshow, built-in contact page, and some photoshop work? Keep in mind - I'm still kind of new to all this, so it'll take me some time..
    Anyways, thanks for any advice!

    function(){return A.apply(null,[this].concat($A(arguments)))}
            ALWAYS charge by the hour, but give a reasonable estimate.
    Interesting how different business models operate. I would say NEVER charge by the hour to quote for a project. No client wants that pricing upfront. It's OK for extras but as an initial quote it's the fastest way not to win work.
    Always get a full, accurate scope of work and give a per project price.
    function(){return A.apply(null,[this].concat($A(arguments)))}
    And as for doing jobs for friends, family or colleges, that's called networking, which is the primary way that independent contractors get business.
    No-one said networking is bad. It's great, if you know what you're doing, what your time is worth, what you're capable of delivering, what the project entails and manage your clients well.
    Working as a favour for friends and colleagues on a shoestring budget with no clear scope of work and a limited skillset is bad. That's what loses you friends.
    function(){return A.apply(null,[this].concat($A(arguments)))}
    So to those of you who have been advising the poster not to take work from someone they know, what kind of slash-and-burn business tactics are you practicing?
    Not sure how you arrive at such a ridiculous conclusion from this thread but see comments above.
    To reiterate:
    Networking is great - if you know what you're doing, what your time is worth, what the project entails and manage your clients well.
    Working as a favour for friends and colleagues on a shoestring budget with no clear scope of work and a limited skillset is bad. That's what loses you friends.

  • My Epson Stylus Office TX525FW scanner does not works, does any one have information about how much time may pass before Epson provides the upgrade drivers for it?

    A couple of days ago, I updated my MacBook Pro to OS X Mavericks and unfortunately my epson mutifunctional in the scanner part does not function any more
    I have visited several times a day the support page for Maveriks inside Epson site and there is not such a driver to solve this problem
    As some members says, I got out Windows machines precisely for things like that and OHH this OS has the same problems

    This isn't Apple's fault. Epson makes the driver. It's not like Mavericks hasn't been out in beta for months. They had plenty of time to do it, but they didn't. Shows you how much contempt Epson has for their customers.
    You might have some success deleting whatever Epson scanner driver and scanning apps you have, and then try Image Capture (it's in Applications), and seeing if it will download a driver for your scanner.

  • How can I see how much data passes through my Time Capsule?

    I am thinking of using a cellular data plan at home. My current, rural internet provider is slow and unreliable. I use a MiFi as a backup and have 4G service which is much faster and rarely goes down. I need to see how much data is downloaded and uploaded to compare costs. All our data passes through my Time Capsule.

    A similar app to what Bob mentions is peakhour.. it works on any of the newer OS.
    https://itunes.apple.com/au/app/peakhour/id468946727?mt=12
    It is a good app. BUT.. fat ugly BUTT.. just the same as Bob has explained, it depends on SNMP to work.. and so due to apple removing a very useful and functional protocol from its airport range you can no longer use it. Bizarre.
    I strongly recommend a Netgear WNDR3800 (older model now but you can pick up one cheaply on ebay) and a 3rd party firmware called gargoyle. Apple delete my posts if I point you to it, so you will have to search yourself.
    Replace your tall TC with the Netgear as the main router.. bridge the TC to it and you can continue to use its wireless and for TM backups. The advantage is that gargoyle will not only measure everyones usage, by IP, it is able to set a quota on everyone using the net and you can set that quota for hourly, daily or weekly or monthly. It will track the usage and you can see at a glance what everyone has used.
    It is simple to load.. just like a standard firmware update. The interface is as clear as anyone can make it with such of lot of tools. And the actual router is powerful enough to provide excellent QoS and parental controls on top of measurements and quota.

Maybe you are looking for

  • Open as smart object problems

    Hello, Im having some problems with Lightroom 4 when using "Edit In" -> "Open As Smart Object in photoshop..." Image open fine in CS6, i can make my edits & save. But when i close the image, an dialog box pops up with the following; Error 2: photosho

  • WIndows not recognizing my ipod shuffle ?!?

    I've downloaded itunes, tried researching and troubleshooting til I'm blue! I plug in the ipod and the only thing my device manager shows is USB mass storage device. By the way, my ipod did NOT come with an installation disc. And yes it's fully charg

  • While updating to iOs5 it stops and says network connection lost or timed out. please help...

    I have tried to update my iPad like 3 times and each time after the 2 hours to do it, an error pops up saying that my network connection was lost/timed out. Please help me!!! This is so frustrating

  • Problem with variable substituion

    Dear gurus, as per my client requirement I am doing variable substitution ! here I am adding  model interface clips !!coming to my problem file is picking but it is not coming to receiver ! so kindly give the solution! thanks in advance a.kumar

  • Is it possible to only submit/email a one page form embedded in a large document?

    Hello. I have a catalogue with numerous product enquiry forms embedded (designed in ID CS6). When one submits an enquiry form, the entire massive pdf is put into an email for sending. Is it possible to define that only the form page is emailed? Thank