Objects how they fit together?

So how important are objects from day one and howcome books dont encourage thier use from the start?
Reason I ask is as I am making a phonebook application should I be making a class for example getPersonalDetails and then save that and reuse it for possibly and address book? Also do you create methods as you go along and must you import a whole class everytime you need it or is it sometimes better to code an internal method if you only need one? Is the concept of OOP to break everything down to its smallest part?
An example would be if my phone book needed a name surname home work cell details then I code a GetDetails class that has methods for getting all those details. But possibly an adress book might only be using 2 of those methods to get name and surname so should i make internal methods or create a object of that class to access those methods that are already coded?
I guess I am trying to ask if you always reuse or if it is preferable to create a new internal method at times?

newark wrote:
nclow wrote:
If I am teaching someone who is completely new to programming how to code in Java, I would not start out by immediately introducing Objects. Teaching a student about variables, assignments, program control flow, functions, primitive structures, editing program files, manual compiling, and the fundamental nature of what a program is should come first, IMHO. I've been convinced of this by teaching experience in which I have seen programming novices absolutely ruined and completely lost in the material 2 months in because the teachers thought a head-first plunge into OOP was the best way to start.I respectfully disagree. Complete beginners to programming are not wired to think like computers. But living in the real world, objects make sense to them. Teaching them what an object is, and how objects interact with one another, is a very beginner-friendly task. Have beginners create a Car object with fields like "year" and "model", and methods like getYear() and they'll have easily accomplished a first program. Then show them how to make a loop that creates multiple cars, or use an If statement to look for a specific car. You'll get more people hooked into programming if the first tasks give positive reinforcement, versus the arduous task of walking a beginner through debugging his for loop on day 1.
But I guess that's all dependent on whether you want there to be more programmers, or if you want to weed out those who aren't immediately committed on the first day.It's quite true that OOP has a lot of fertile ground for a student to relate to. Objects and classes can be understood relatively easily even by novices. Unfortunately, a lot of instructors seem to then go right ahead into inheritance, interfaces, polymorphism, and all manner of complicated concepts before a student even knows how to write a loop. Despite favoring the Java language a great deal, I'm particularly disdainful of "Java shops" for this reason, because the product is often a student who has no mastery at all of the basics, and ends up struggling greatly. I'm not sure what's so horribly arduous about building a for loop versus building an object, and I consider a for loop to be more of a fundamental skill to programming in general.
I favor introducing "objects" and "classes" early, but not immediately.

Similar Messages

  • How to divide different pictures into pie pieces so that they fit together in a circle

    I have six photos that I need to divide into pie piece shapes so that they fit together in a perfect circle. How do I do this??

    Draw a unilateral triangle (all angles are 60 degrees therefore) with the shape tool and use it as a vector mask on the images or as a template for a selection. Copy&paste as needed and rotate in place, then add a circle on top to cover up the unwanted parts.
    Mylenium

  • Solution Manager - NWA & CEN - How they fit in ?

    Hi,
    I have been working with XI and have come across the central monitoring system CEN and the netweaver administrator (NWA) tools.
    Does anyone know how they fit into Solution Manager. Especially why you have solution Manager Diagnostics and NWA....are they not the same thing?
    Currently it looks like we'll have an XI landscape being monitored by CEN & NWA and then the same landscape also being monitored by solution manager. This seems like a double up of work to me.
    Thanks
    Jim

    Hi Pascal,
    Thank for that...
    Would i be right in saying then that CEN is part of solution manager 4.0 i.e comes with webas 640/700 anyway ??
    So for a "perfect/easy" support environment you would have sol man 4.0 managing all your abap components from both a read/write point of view and then sol man managing j2ee area on a read only basis while NWA administering your j2ee's on a read/write basis.
    And ideally have all these components looking at the same SLD.
    Hope above make sense
    Cheers
    Jim

  • How they fit videos onto the Touch ...

    Has anyone noticed that the videos Apple supports are in 640x480 format (aspect ratio 4:3), but the Touch screen is 480x320 (3:2 ratio)? Assuming the pixels are square, and you don't stretch in one direction over the other thereby distorting the image, there are only two ways to accomodate the movie. One is to match widths. Here, the original movie is scaled to fit the width of the Touch (while in landscape, or "wide-screen" mode, of course). This would cut off a thin band on top and bottom of the movie that you would see missing.
    The other, which I think they do, is to match heights. Here the movie is scaled to fit top to bottom. This leaves thin vertical bands on the left and right of the Touch screen "unused" but you don't notice it as much as the full movie is seen.
    Thoughts?

    Thanks Johnathan. I know that My comment was more of a curiosity that given the common 640x480 format of so many images/videos (4:3 ratio) that Apple would go to a 480x320 screen, which results in a bit of it not used during video playback.

  • JSP, JavaBean, web.xml - how to fit together?

    Servlets should be placed into the web.xml file to be recognized correctly by a application server.
    Is this also true for JavaBeans (NOT Enterprise JavaBeans!)? Since I don't call a JavaBean directly but only over tags within a JSP I'm not sure about this. If I have to put it in there, do I use the same syntax?
    e.g.:
    <servlet>
    <servlet-name>exampleBean</servlet-name>
    <servlet-class>example.exampleBean</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>exampleBean</servlet-name>
    <url-pattern>/exampleBean</url-pattern>
    </servlet-mapping>
    By using this, the will server know that this Bean has to be deployed?
    Since I'm pretty new to this topic I'm grateful about any comment.
    Thanks in advance!

    Hi,
    JavaBean are java classes and they must be on the classpath in order to be loaded.
    only servlet,jsp,filters,listeners must be declared in the web.xml file. all the java classes can be put under /WEB-INF/lib in order to be loaded by the appserver
    hope it helps,
    Giovanni

  • JQuery Mobile and page transitions in Apex - how do they go together?

    Hi guys,
    I started off on a jQuery Mobile project with APEX - although I am still quite new to both. I have done quite a bit of research, but I haven't found really anything substantial about how they go together.
    Rather it appears to me, that both have their own way of dealing, that is to say recieving and sending data. Apex with normal http-requests, just a little AJAX on the side maybe, JQM almost only with AJAX.
    So I am running into a lot of trouble, when I use functions like apex.redirect() or .submit(), the $mobile.changePage() mostly doesnt how I want. Page content often stays in the DOM with JQM unwanted, data are sometimes not refreshed properly, or when I close a popup box, an unwanted reload takes place. Events are not bound the usual way, etc. etc.
    I certainly thoroughly have studied the JQM documentation, looked through many other tutorials and blogs, but basically I still lack in a lot of basic understanding, especially the communication between JQM and APEX - after all, the APEX Smart Phone UI from 4.2 is still quite new. And all tutorials about data management with JQM deal with JSON objects or XML - methods we can't get into due to time reasons.
    I have two questions to the community:
    A) Is it really recommendable to use a JQM framework with the "normal" page-show and page-submit events, that APEX delivers? Or if not recommendable, is it practical?
    B) Maybe some experienced users here can hint me to some recourses that specifically deal with the issues I mentioned above: e.g. How does JQM handle the urls it gets, when you use the APEX javascript functions? What global JQM settings are recommendable when using APEX, or what object-parameters should you use in the $.mobile.changePage() call?
    And one specific problem I just ran into: How does JQM treat Page-0 items? I use them for global application control, but for some strange reasons, they sometimes seem to be resettet.
    So these are a lot of questions, but I don't seek detailed answers here, rather some general guidence and advise. Any help is most appreciated.
    So long, with best regards,
    tobi
    Edited by: TobiP on 14.02.2013 13:41

    I will up this thread one time - what I normally wont do. But if noone can give any hints here this would be a really bad sign.
    I have kept on looking for those topics, but I still haven't found anything that goes into detail regarding APEX and JQM.
    Also one last wierd situation I would like to relate, that just occured: I submit a page with apex.submit('CREATE'), the dml-processing takes place, there is an unconditional branch after the processing back to that page, so it should be reloaded and refreshed - but it doesn't. Instead when I open a select list (JQM popup style), then the page gets refreshed, and the popup wont close anymore. I have no explanation for this. I hope, anyone can give me any hints.
    Thanks very much,
    tobi

  • How are Hot Spot Compilers and VMs of different vendors fit together?

    I read that the Hot Spot technology is splitted up into a Hot Spot compiler and a Hot Spot VM. Since maybe the ISV uses another Hot Spot Compiler (maybe IBM on Windows) to compile and the user drives that app on another Hot Spot VM (maybe Novell on Netware), I am wondering how this fits together?
    Do some compiler/VM couples make problem? Do some combinations produce higher performance or smaller memory load than others?
    Any comments welcome! :-)

    You compiled the same application using jikes and the
    sun javac and then ran it on the the same jvm (and
    version) and got a 10% improvement using the jikes
    binary?Yes, but this was more than a year ago. I used javac from Sun 1.3 in comparison with the latest jikes from IBM. Both binaries I started on a Sun 1.3 VM and the jikes code performed UP TO 10% for SOME CASEs. It was a micro benachmark, so I could imagine that jikes optimized some code sequences out of the code, whereas javac did not. Anyway, micro benchmarks are not totally exact and one should do an application benchmarking with the latest compilers from both companies.

  • How do I view page margins and drag objects around to fit?

    How do I view page margins and drag objects around to fit?

    Hi Sime,
    Some ideas for workarounds now that Numbers 3 has lost Page Setup, Print View and Layout View.
    1. Numbers 2.3 is still on your computer unless you deleted it. Look in your Applications folder for the iWork '09 folder. Drag the Numbers '09 (Numbers 2) icon to your Dock. It will become an Alias. Right click (or control click) on it then Options > Keep in Dock. You might actually enjoy running both versions at the same time, to compare features. Just be careful which version you are running before you edit and save.
    2. Use Numbers 3 to export a document 'backwards' to Numbers 2. Be aware that features lost in Numbers 3 may not be restored by exporting 'backwards' to Numbers 2.
    3. In Numbers 3 > Preferences > Rulers
    Those Guides help you to align objects with each other.
    4. Menu > View > Show Rulers. This will show zero for the top or right left margin. Then drag a ruler guide from top or left.
    More hints on workarounds here:
    https://discussions.apple.com/message/23622372#23622372
    What has been GAINED in Numbers 3 is here:
    https://discussions.apple.com/thread/5473882?start=45&tstart=0
    If you want to see what has been lost in Numbers 3, go here:
    https://discussions.apple.com/thread/5470448?start=240&tstart=0
    Regards,
    Ian.
    Message was edited by: Yellowbox. Oops, This will show zero for the top or *right* margin. Mirror image this to *left* margin

  • How to fit frame to content when content contains anchored text box?

    Hi there
    I am creating a series of inline text frames within a text frame. Each of these inline frames contains text which includes an anchored text frame. If I tell my inline frames to fit to content they seem to ignore the anchored frames contained therein. Is there any way I can get them to consider the anchored frames they contain when they fit to content?
    I tried checking the geometric bounds of my anchored frame before and after its parent frame has fitted to content. Even when there has been no change in position the bounds after fitting to content seem to give numbers way off. I thought I might be able to reset the geometric bounds of the containing frame manually if the anchored frame therein had moved with the fit frame to content.
    Here is a snippet of my code:
    var anchoredBounds = anchoredFrame.geometricBounds;
    mainFrame.fit(FitOptions.FRAME_TO_CONTENT);
    mainFrame.texts.item(0).recompose;
    var newAnchoredBounds = anchoredFrame.geometricBounds;
    alert(anchoredBounds[0] + "; " + newAnchoredBounds[0]);
    So “mainFrame” is the text frame containing text and the anchored frame, “anchoredFrame”. “anchoredBounds[0]” seems to correlate with the top edge of the frame when I check it manually after the script has finished (when it hasn’t move with the fit to content). “newAnchorBounds[0]”, however, always gives numbers that are way off every time. Any ideas why this would be the case?
    And most importantly, can anyone suggest how I can get my “mainFrame” to consider the “anchoredFrame” contained in it when it fits to content?
    I’m using CS4 on a PC. Let me know if it would help to post more code, or if I haven’t explained myself clearly enough.

    Is there any way I can get them to consider the anchored frames they contain when they fit to content?
    @Graham – as long as ALL the anchored text frames are "inline" text frames,
    mainFrame.fit(FitOptions.FRAME_TO_CONTENT);
    should work as expected or at least sort of *.
    Without calculating anything at all.
    Just tested in InDesign CS5.5 (v7.5.3).
    Could it be that CS4 will fail on that?
    Of course, you can only rely on this, if the main text frame contains any "real" text at all. Not only the  special characters representations of the "inline" text frames. In that case the fit() method will do nothing at all.
    * it's debatable, if the fit() method yields desirable output.
    It depends on your expectations.
    See the following examples:
    1. Case 1:
    Text frame before fitting:
    2. Case 1:
    After fitting with the UI command, context menu: "fit frame to contents"
    (note the gap between the last baseline of the text and the text frame; note also  the new width)
    Is that the result you would expect? I guess not.
    3. Case 1:
    After fitting  programmatically with myTextframe.fit(FitOptions.FRAME_TO_CONTENT);
    4. Case 2:
    Before fitting
    same text frame as in #1, but different height
    5. Case 2:
    After fitting with the UI command, context menu: "fit frame to contents"
    A different width than in #2 and a gap at the bottom of the text frame!
    Not the desired result, I'd say…
    6. Case 2:
    After fitting  programmatically with myTextframe.fit(FitOptions.FRAME_TO_CONTENT);
    Same result as in #3
    So with scripting we could, at least, get consistent results.
    Of course, you could get the same results in the UI, if you double-click on the bottom center control point…
    Maybe it helps, if you are showing us some screen grabs:
    1. Your starting point
    2. The desired result
    Uwe

  • Any idea how they did this??

    Hey guys check this out, does anyone have any idea how they did this http://www.adidas.com/campaigns/styleessentials2010/content/Default.aspx?headerType=discre et&strCountry_adidascom=us#/journey
    I would like to emulate this technique if I can.

    that's masking with dynamically created movieclips (or sprites) and some additional dynamically created objects.

  • Fireworks slices not fitting together when I put them in HTML

    I created a map of the world, created slices for the continents and made them rollovers with links to pages.
    I exported it as slices with HTML Dreamweaver because I am using Dreamweaver for layout. I tried to export it as something else but it wouldn't let me put in the code in Dreamweaver saying it wasn't Dreamweaver HTML or some such error.
    I preview and open the file by itself and it shows fine (with blue lines, another issue I know)
    I have a DIV on my page for the map. I inserted the fireworks HTML file and its not fitting together anymore, the sections are all separated a bit, they still rollover and link but all my slices are not fitting together correctly and not fitting into the DIV.
    I am not opposed to exporting it differently or putting it in the page another way, has anyone experience their sliced image not fitting together, each piece working but with a bit of air inbetween once you try to incorporate it into your webpage? I have been using HTML5 and CSS3 and this is my first time to try to use Fireworks for something like this.
    Thanks for any suggestions you might be able to offer.

    Here is what it looks like in the Muse design window:
    ...and here is what it looks like when I hit "publish":
    ...the text and associated email list widget move way down the screen. I can cause the whole lot of it to move up the screen by moving it up in the design window... but it is not a direct translation from design to publish, the way it is in all other areas of my site.

  • Non existent table still in sys.objects, how to fix that?

    I have moved a table from one table schema to another one (dbo.MY_TABLE to RAW.MY_TABLE), using ALTER SCHEMA..., the problem is when our ETL is trying to remove all the constraints it finds 2 records (dbo.MY_TABLE), one for the user table and the other
    the PK of that table. The problem is that the sys.objects points to dbo.MY_TABLE which now doesn't exist anymore. How could I update the sys.objects table to correctly reflect that the table has moved table schema?

    Hi,
    sys.objects lists user objects. If
    select * from sys.all_objects where name='MY_TABLE'
    gives you more than 1 table (look at the "type_desc" column), you DO have more than 1 table. One in "dbo" schema and one in the "raw" schema.
    Those 2 tables should have different object_id values. Object_id is unique within a database, and all dependant objects use that object_id to refer to the object. They do not use object_name, schema name, not even schema_id. Just object_id. If you want to
    see all objects, including system objects, query sys.all_objects.
    Regards,
    Vedran

  • Design patterns,about value object ,how?why?could you give me a soluttion

    design patterns,about value object ,how?why?could you give me a soluttion
    use value object in ejb,thanks
    i want not set/get the value in ejb,find the method to solve it ,use value
    object ?
    how? thanks.

    Hai
    Enter your telephone number here, at the top it will say your Exchange, Phone and cabient number. If it doesn't mention cabinet that means you are directly connected to the exchange and not via PCP.
    If you are connected to a cabinet and it doesn't say FTTC is available, ask your neighbor to-do the same test (they have 2 be infinity connected). If they are, then proceed to contact the moderators here. Though it could not be showing because all the ports have been used up in the FTTC Cabinet.
    If this helped you please click the Star beside my name.
    If this answered your question please click "Mark as Accepted Solution" below.

  • I have songs on my iPhone 6 that I can't remove and when I plug into iTunes and go to "Summary" and "On This Device" the songs don't show up but they are on my phone. How do I remove them? Not even sure how they got on actually.

    I have songs on my iPhone 6 that I can't remove and when I plug into iTunes and go to "Summary" and "On This Device" the songs don't show up but they are on my phone. How do I remove them? Not even sure how they got on actually since I have a iTouch and keep all my music there. HELP!!

    Have you tried deleting the songs from Settings?
    Settings -> General -> Usage -> Manage Storage (not the iCloud link!) -> Music and then click Edit to enable you to be able to delete.

  • HT201493 How can I add my daughter to Find my friends when we have the same itunes account and that's how they make us log in?

    How can I add my daughter to Find my friends when we have the same itunes account and that's how they make us log in?

    1) You asked "Does she need to reconnect to that itunes/computer and if so what do we need to do to remove this folder of pics from her ipod?" Yes, you have to connect the iPod to that computer and go to the Photos pane for the iPod in iTunes and uncheck sync photos and the click on synce/apply. In the future do not check sync photos.
    iOS and iPod: Syncing photos using iTunes
    2)
    Create a NEW account for using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    Then on the iPod go to
    - Settings>Messages>Send and receive and sign out your ID and sign into hers. Make sure that only her ID email address is listed.
    - Settings>FaceTime sign out of your ID and sign into hers. Make sure that under You can be reached at only her ID email address is listed
    - Settings>iCloud and sign out and sign in with hers
    Contnue to use the commpn ID/account for Settings>iTunes and App stores.

Maybe you are looking for

  • Can't print to AEBS from Windows computer

    I have an ibook and a Dell desktop running Windows XP. I'm using an AEBS with a Canon i560 connected via USB. This setup has worked fine for two years but now I suddenly can't print from the Dell. I used Rendevous (now BonJour) when initially setting

  • Importing large amounts of baggage files?

    I'm making generating a new roboproject from a Word document. Only one of the problems I'm having is that the Word document contains a lot of links to external files. These links still exist in Robohelp, but they don't refer to right location anymore

  • Windows for Mac on Macbook Air?

    If I buy a macbook air (MC969ll/a) will my "windows for MAC 2004" work on Lion? Will I be able to load my 09 ILife and 09 IWork onto my Macbook Air laptop?

  • Apple headphone controls only working intermittently

    Hey, I have a 6th generation Ipod nano and a pair of the apple in-ear headphones. The headphones work perfectly (tested with iphone)and when I bought them I was told by the guys in the apple shop that they should work fine. Sometimes they do work per

  • Forwarding to new domain

    Dear All, I have created a new domain and mail users are defined in a new server other than the backend server. I would like to forward any incoming emails to that domain to the new server. How can I setup the front end servers to forward those email