Shape Hierachy

Hi everyone I am VERY new to java and need some help tackling this problem. I have to use hierachy to create a program that uses an array of Shape reference to objects of each concrete class in the hierachy.
shape---> twodimensional or threedimensional ----> twodimensional: circle, square, triangle or threedimensional: sphere, cube, tetrahedron.
I must determine whether the shape is two dimensional or three dimensional. If the shape is two dimensional I have to display it's area. If the shape is three dimensional I must diplay the area and volume.
I understand the later part where
circle extends twodimensional
but I just need help getting the ball rolling.
Thank you for your time.

The idea of hierachy is that you place the common attributes in parent class and specific ones in sub classes.
Example:
class Vehicle
+int numPlate
+int numWheel
+Color color
class Car extends Vehicle
+int zeroTo100time
class Lorry extends Vehicle
+int maxLoad
Hope that helps @_@

Similar Messages

  • Show-stopper How can I determine tab hierachy from ids in wwpob_page$

    I have application components published as portlets that depending on the particular page/tab combination perform various functions.
    I am able to get the page_url from my report components published as portlets through p_page_url.
    The URL obviously keeps track of which particular tab was last active
    page?_pageid=54,93,62,68,86,98
    I know the table wwpob_page$ contains these id values.
    I need to be able to determine how the tab hierachy is determined.
    Such that how one can determine which tabs can exist under a parent tab and so on based on the id.
    10 20 30 40 50
    55 58 44 48 64 68
    99 105 111 72 76
    I know I could "hard-code" id values to determine which particular tab I am currently on.
    I want to be able to use tab "friendly" names.
    select p.id, p.name, s.text
    from wwpob_page$ p, wwlns_strings$ s
    where p.title_id = s.id
    order by p.id asc
    My code needs to be robust enough so that if new tabs are added, I can still decipher the URL!!!
    Can someone also tell me how the URL is built and what determines the order of tab_ids?
    This is urgent and a show-stopper!
    kind regards,
    Matt.

    It's my fault, I lost you there.
    See I wrote the steps as they were in  "Adobe Help" so please forget about the last comment.
    I chose the "advanced mode" because I have more than one menu to filter (shape and color) 
    lets say I want the comments on my website to be displayed conditionaly, and I have two lists one for colors (blue and pink) and other for shapes (square and circle), 
    So I'm going to have four pages each page has its own recordset, let's say now I want to filter the recordset for (Blue Circle) page 
    I don't know how to do it but by following the steps in Dreamweaver help: 
    -Select name, and click the Select button. 
    -Select content, and click the Select button. 
    -Select shape, and click the Where button. 
    -Select section, and click the Where button. 
    -Select time, and click the Order By button. 
    this is how the SQL statement look likes:
    SELECT mytable.name, mytable.contents
    FROM mytable
    WHERE mytable.shape='circle' AND mytable.`section`='blue'
    ORDER BY mytable.hdw_serverTime 
    then to Define the variables 'circle' and 'blue' :
    by clicking the Plus (+) button in the Variables area and entering the following values in the Name, Default Value, and Run-Time Value columns:
    circle,square,Request("circle")
    blue,blue,Request("blue") 
    Also I understand that I have to define a parameter but which (URL or Form) and how?  I don't know 

  • Dvi to video adapter changes shape

    When I plug my DVI to Video adapter into my macbook pro, all of the displays change shape, and no matter what resolution I choose, it won't go back to it's true size.   When I try a DVI to vga adapter, it works fine.

    Try starting the Mac in Safe mode.
    http://support.apple.com/kb/HT1455
    Hopefully that will result in a usable screen. If it does, go into Displays Preferences and change the resolution to what it was when you had things working properly before. Then restart normally and the resolution selection made under Safe mode should persist through the normal restart.

  • Trying to fill a shape or change text colour-it is always grey instead of the colour I picked?

    I have been working on a file and whenever I have a couple of shapes and some text. When I try to change the fill of the shape or change the text colour it is always changing to grey. It will let me pick a colour, but the box at the bottom(foreground/background box) is always grey as well. Please help.

    THANK YOU SO MUCH BARBARA! I really appreciate you taking  the time to reply to my simple problem(eventhough at the time it was so frustrating). Thanks again. Leanne

  • LACK OF FULL PEN TOOL FUNCTIONALITY WHEN CREATING A SHAPE LAYER

    Hello, I'm going through Chris Meyer's video course on being an AE apprentice and have spent over an hour on the following issue.
    Here is what I know.
    I know I am trying to create a shape layer, not a mask, to create a frame to surround the video of the green field on the attached screenshot.  Therefore, I pressed "F2" to make sure I am doing so.
    I want to define the borders of this picture frame by using the pen tool to draw a path on the layer entitled "Windy Peak".
    I have highlighted that layer in my timeline.
    This video was pasted on to a placeholder shape that I had created using Command Option "/" on my Mac.
    I do have limited use of the pen tool, because it displays properly when I hover it above the borders of the video to be framed.
    But I lack access to the toolbar controls I want to complete my assignment.
    For example, I would like to create a gradient to define the internal coloration of this frame, but I have no use of the eyedropper when I click on the Color Picker.
    Also, I am unable to access or manipulate any of the standard fill or stroke options for use of my pen.
    This is what I know.  
    Thanks for your help!   Matt
    Message was edited by: Matt Dubuque to add the fact that the video had been pasted on to a placeholder shape image by pressing Command Option "/" on my Mac.

    Thanks for pitching in Todd and Rick, I appreciate it very much.
    As previously stated, I do have use of the pen tool, but it only has limited functionality as demonstrated by the path I created on the green meadow.  My Tools Panel remains activated .
    My core problem remains that I am unable to adjust the fill or stroke settings for my pen.
    I have tried changing and resetting various work spaces and this has not helped.
    I'm scratching my head here.
    Matt

  • General Hierachy in Report Painter

    All,
    Is it posible to use my own hierachy create in transaction MCK1 in Report Painter ( GRR1 / GRR2 )?
    If yes, how can I do it?
    Pat.

    Hi Patryk,
    with MCK1 you create hierarchies for MM areas. These hierarchies cannot be used within Report Painter.
    Best regards,
    Daniela

  • I would like to downgrade to the older version of the Adobe Shape App Version 1.2.0. Can I please be provided with a link in order to download the older version?

    I would like to be provided with a download for the older version of adobe shape 1.2.0 please!

    If you've been backing up to your local iTunes library, check your APPS pane to see if you have an older version of Shape stored locally. If you do, you can delete Shape from your phone, connect your phone to your computer, and drag the older version from your iTunes library onto your device. That's what I did to go back to the older version, which produced shapes that work much better for my purposes.
    Adobe, it seems like with the newest version of Shape, you made DRASTIC changes to the way the app processes images into shapes. Is there any way for us to opt for the older version of processing? Or to toggle between the two?

  • How can I create a Frame & dialog box with a desired shape & look ?

    Hellow !
    Currently I am writing an application that need your help.
    I need a complete code to create a custom JFrame & JDialog.
    Objective:
    1) The frame & Dialog box might not be in a rectangular shape.
    2) Their visible area [ Title bar(With my new icon),outer edge and iconifying,deiconifying & window closing buttons ]
    would be as I wish.
    As an instance, I mean to say it should looks something like Widows Media Player's(XP version) main window.
    My Operating System: Windows XP

    I think (I have never tried it) that the following link provides the kind of api you are looking for :
    http://www.l2fprod.com/
    As far as I know, it's based on the use of a custom look and feel called SkinLF.
    But due to the nature of your question and based on the assumption that people here are not going to do all the work for you, I would strongly advise you to start with the Swing tutorial :
    http://java.sun.com/docs/books/tutorial/uiswing/

  • What is the difference between Create shapes or masks from text characters?

    What is the main difference between Create shapes or masks from text characters and why use one over the other, or when is one preferred over the other?
    I am still fairly new to AE and am trying to better understand this, or can you point me to where i might look for the answer?
    CS5 if that make a difference.

    One creates masks, the other creates shape layers. There are properties that you can animate with shape layers that are not available to masks. There are also a few things you can do with masks that you can't with shape layers.
    I'd suggest you take a look at the help files or do a Google Search on After Effects Shape Tutorials.

  • Is it possible to convert text captions to Smart Shapes?

    Hello,
    I have a collegue that is using Cp 5 to record software simulations which then need to be brought into Cp6. The problem is that our standards (for software simulations) employ Smart Shape call outs (not the Cp 5.5 and earlier text captions).
    Is it possible to convert these text captions into our themed Smart Shapes either automatically inside Captivate 6 or by modifying the content within the CPTx file?
    Thank you,
    Shawn

    Hello Lilybiri,
    As always you are awesome! :-)
    >I don't believe an automatic switch will be possible, because smart shapes are totally different objects.
    I understand because there are a huge variety of shapes in either format. But I suspect that it should be easy to convert a text caption from any style to one specified smart shape style.
    Actually, I am asking before the simulations get started. So nothing has been done yet. I am unsure what you are suggesting I should do in the preferences under Cp 5.5. Are you suggesting that there is a way to convert 'some format' of text callouts, in a Cp5.5 demonstration simulation, to Smart Shapes in Cp6?
    >but since you already have created the simulations, it has to be done manually. Hoping for you that
    >someone has a bright idea, but I do not see one immediately.
    For anyone else in this situation, it would be handy to have a solution (rather than painstakingly convert each manually).
    I am wondering if this might be a relatively easy search/replace within one of the xml files within the CPTx file. I'm going to look at this tonight.
    Thanks for your assist.

  • A better way to rotate a shape

    I need a way to easily rotate several Ellipse2D objects. The approach I'm using is not working because it's rotating the entire coordinate system in my Canvas object:
    public void paint(Graphics g) {     
    Graphics2D g2 = (Graphics2D) g;          
    Ellipse2D.Double e = new Ellipse2D.Double(220.0, 75.0, 47.0, 30.0);
    AffineTransform rotate45 =
    AffineTransform.getRotateInstance(Math.toRadians(161.5),
    220.0, 75.0);
    g2.setTransform(rotate45);
    g2.draw(e);
    } // end paint
    Is there something better to use other than AffineTransform that will allow me to rotate just the shape itself?
    thanks,
    Eric

    You can still use AffineTransform. There is a method called createTransformedShape and it does what you want.
    http://java.sun.com/j2se/1.4.1/docs/api/java/awt/geom/AffineTransform.html#createTransformedShape(java.awt.Shape)
    Ellipse2D e = ...
    AffineTransform rotate45 = ...
    e = (Ellipse2D) rotate45.createTransformedShape(e);
    ...

  • Draw an visio shape as an .vdx file and render the same in a IE browser

    I had generated an Visio Diagrams getting input from the excel file and stored it in an local path.
    private void DynamicVisio_Load(object sender, EventArgs e)
                string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= 'c:\\Test\\FullData3.xls';Extended Properties='Excel 8.0;HDR=Yes;'";
                string sQuery = "select * from [Customer1_Server$] order by Name";
                DataSet objExcelDS = new DataSet();
                OleDbDataAdapter objDA = new OleDbDataAdapter(sQuery, strConn);
                objDA.Fill(objExcelDS);
                double dblX1 = 0.5d;
                double dblY1 = 10.3d;
                double dblX2 = 2.258d;
                double dblY2 = 6.8d;
                String sText = "";
                String sFilePath = "";
                String sDisk = "";
                String[] sArray;
                String[] separators = { "," };
                String sPicturePath = "C:\\Test\\test.png";
                String sIPRangeValue = "";
                Visio.Application objVApp = new Microsoft.Office.Interop.Visio.Application();
                objVApp.Documents.Add(@"C:\Test\CustomTemplate\ServerTemplate.vsd");// add a document
                for (int i = 0; i < objExcelDS.Tables[0].Rows.Count; i++)
                    Visio.Page objVAPage = objVApp.ActiveDocument.Pages.Add();
                    objVApp.Documents.Add(@"C:\Test\CustomShapes\MyShapes.vss");// add a document
                    Visio.Document objVADoc = objVApp.ActiveDocument;// set the working  document to our new document
                    Visio.Masters objVMasters = objVADoc.Masters;
                    Visio.Master objVMaster = objVMasters.get_ItemU("CustomTab");
                    Visio.Shape objTabShape = objVAPage.Drop(objVMaster, 8.24d, 5.54d);
                    objTabShape.Text = objExcelDS.Tables[0].Rows[0]["VLAN"].ToString(); ;
                    //set the Shape Width
                    objTabShape.get_CellsSRC(
                            (short)Microsoft.Office.Interop.Visio.VisSectionIndices.
                            visSectionObject,
                            (short)Microsoft.Office.Interop.Visio.VisRowIndices.
                            visRowXFormIn,
                            (short)Microsoft.Office.Interop.Visio.VisCellIndices.
                            visXFormWidth).ResultIU = 16.0;
                    //set the shape height
                    objTabShape.get_CellsSRC(
                       (short)Microsoft.Office.Interop.Visio.VisSectionIndices.
                       visSectionObject,
                       (short)Microsoft.Office.Interop.Visio.VisRowIndices.
                       visRowXFormIn,
                       (short)Microsoft.Office.Interop.Visio.VisCellIndices.
                       visXFormHeight).ResultIU = 10.6;
                    Visio.Shape objOuterBox = objVAPage.DrawRectangle(dblX1, dblY1, dblX2, dblY2); // Outer Rectange
                    sFilePath = "C:\\Temp\\ServerTemplate"+i.ToString()+".vsd";
                    objVApp.ActiveDocument.SaveAsEx(@sFilePath, (short)Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visSaveAsWS);
    but I need to generate the same visio diagram over the web application using the Response.ContentType. ie.
    context.Response.ContentType = "application/vdx.visio";
    context.Response.AddHeader("content-disposition", String.Format("attachment;filename=\"{0}.vdx\"", fileName));
    Pls give me an idea about it along with any example if possible.
    Thank you.

    Hi,
    This Visio forum is for general questions. Since your issue is related to developing, I advise you to post this issue on Office for Developer forum.
    https://social.msdn.microsoft.com/Forums/office/en-US/home?category=officedev
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners
    who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Best regards,
    Greta Ge
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • 'select all' in pages 'shapes' does not work

    When drawing 2-D floor plans using Pages / Shapes......the 'Select All' function does not work !
    I am uisng Mountain Lion, v 10.8.3
    Any help will be appreciated
    Thanks
    Sheldon

    Hi Sheldon,
    Is your document based on a Page Layout Template?
    In Pages, a floor plan is more suited to a Page Layout document (which mimics a drawing app) rather than a Word Processing document.
    Here is a document that I created with Template Chooser > Page Layout > Blank.
    I added some Shapes and Text Boxes.
    'Select All' (command a) selected everything:
    I hope this helps.
    Regards,
    Ian.

  • How do I use shapes I create in Adobe Shape?

    All the shapes you create with Adobe Shape are stored in a CC Library.  This means you can access them in other desktop, mobile, and web apps.  Detailed instructions below.
    How to access your shapes in Creative Cloud
    Desktop: In order for this to work, you must have the most recent version of Illustrator and Photoshop.
    Open Adobe Illustrator on your desktop.
    Open the Libraries panel (Windows > Libraries)
    Your shapes should be present in your Libraries.  If you don’t see them there, select the libraries drop down to see if you saved your shapes in a different library.
    Now, you can drag the shape onto your canvas.
    At this point,  you can continue working with your shape, by adding editing.  Or, you can simply save the file.  Of course, after you save it to your desktop, you can email, post online, etc.
    Mobile apps:
    Open Adobe Illustrator Draw and open a drawing.
    Tap the Shapes icon to open the Shapes menu.
    Tap a library name to view the shapes in the Creative Cloud Library. Tap Change Library to select another library.
    Select your shape by tapping on it.
    Active Slide or Tocuh Slide. You can use Adobe Slide or Touch Slide to place the shape on the canvas. Access Touch Slide by tapping on the circular icon at the top of the menu bar.
    Place the shape.  Once you have activated Touch Slide, you will see a light rendition of your shape on the canvas.  Simply double tap on the shape outline to stamp the shape in place.
    Web:
    Navigate to https://assets.adobe.com/
    Select the Libraries menu item (left menu on the page)
    Select the desired library (if this is your first time using Libraries, you will only have one).
    This page provide a preview only.
    Also, here’s a great walk through video that may be useful: http://helpx.adobe.com/mobile-apps/how-to/shape-get-started.html?set=mobile-apps--fundamen tals--adobe-shape-cc

    I use Illustrator CC not Illustrator CC 2014 where can I find "Open the Libraries panel (Windows > Libraries)" and How can get the vector file from adobe shape cc?

  • How do I use "Trim Paths" after "Create Shapes from Vector Layer" on a strokes only layer?

    Hello,
    Adobe After Effects CC
    2014.0.2
    Version 13.0.2.3
    I have imported an illustrator file that was created in Illustrator CC 18.0.0. The file contains the outline of a logo. It is the logo with the fill set to none and the stroke set to 1px.
    I drag the logo_strokes.ai file onto the composition, right click, and click Create Shapes from Vector Layer.
    A new layer is created and in the Contents "drop down", a Fill 1 layer is created.
    When I select the Contents "drop down" and click Add / Trim Paths, a Trim Paths 1 layer is created.
    When I animate Trim Paths 1, it appears to animate the Fill layer, not the stroke.
    How do I get it to animate just the stroke, and not show a fill at all?
    Thank you.

    Thanks,
    I am reading and watching tutorials. Still stuck on that one point.
    Here are the images of the After Effects layers. The illustrator layer is the top layer.

Maybe you are looking for

  • How to create Rules with Flex Field mapping in the bpm worklist

    I Have created a flex field label and was able to map to the flex field attributes . But when i try to create a rules , I don't see the label or the flex attributes in the task payload . Can someone please help is understanding how to create Rules wi

  • Windows Theme not applied after changing OS language

    Hi,     I have a theme(.theme file) which I have created and applied on my system. However after I change the language from "Control Panel > Region and Language" setting, my theme which was applied goes away. I tried retaining the theme by Enabling b

  • Can a thunderbolt port take hdmi in?

    Macbook Pro Early 2011 15" 10.9.2 If I were to take an Xbox 360 and plug it into a thunderbolt port via a thunderbolt to hdmi cable, could I run the display on my computer like a TV? Or does the thunderbolt only put display out? Thanks.

  • JAXB Marshalling Question

    below is what I get for marshalling some JAXB generated class instance, and i notice that several namespace was create ns1, ns2, ns3.... which are actually all sharing the same namespace, is there anyway (any option) that I can set to optimize it, so

  • How do I disable the java plugin?

    I have already done -tools->Internet options->Advanced - unchecked 'use java2 1.4.2_04 for < applet> (requires restart)' - checked Microsoft VM java console enabled (requires restart) - reinstalled the MS JVM (MSJavWU_8073687b82d41db93f4c2a04af2b34d)