Please help with our project

We are media students and we have an exam in a few hours.
Could you please help us out with these question.
1. A _____________is single occurence of a cast member.
2 Two types of window in director, __________ window and
__________window
3. Guides are ___________ or _____________ lines that you can
either drag around the stage or lock place to asist user with
sprite placement.
4. __________ is used for navigation and user interaction
5. A film loop is an animated sequence that is used as
________________ cast member
true or False
1. In tool palette default view combines elements from other
classic and flash component.
2. Director can perfrom any editing on digital video
3. A director file can contain more than one movie script.
4. Vector shapes an bitmaps are the two types of graphics
used with director.
5. A frame is an individual point of time in the score.
6. importing media element is similar to importing
images.

Hi Preethi,
SAP Mobile Infrastructure is a Java Framework for building offline (or occasionally connected) mobile applications.
The framework runs on PPC 2003se/WinMobile2005 as well as on Win32 (XP/2000). It offers 2 ui paradigms: AWT or JSP.
The supported java VM is the Creme 3.27(a) on PPC and java 1.3./1.4. on the win32 platform. The Creme 3.27a implements Java 1.1.8 API.
To get info on how implement MI Apps please refer to the mobile dev. kit:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eba3a7-0601-0010-b982-92f1fca3258a
As well you can check out the following track:
New to this
Rgds Thomas

Similar Messages

  • Please Please Help with Projectile Project Here are the Codes

    I've got three(3) classes a Model, a view, and a controller.
    This is a project about projectiles.it is an animation of a cannonball being fired from a cannon and travelling under the effect of gravity.A cannon fired at angle 'a' to the horizontal and with an initial speed 's', will have an initial velocity given by:
    vx := s * cos(a);//velocity x equals the speed multiply by the cosine of angle a.
    vy := s * sin(a);//velocity y equals the speed multiply by the sine of angle a.
    Here are the code.
    Model:
    /** Cannon specifies the expected behaviour of a cannon*/
    public class Cannon{
    public static final int TICK = 60;
    private int velocity = 0;
    private static final double gravity = .098f;
    private double angle = 0;
    // distances & positions are meausred in pixels
    private int x_pos; // ball's center x-position
    private int y_pos; // ball's center y-position
    // speed is measured in pixels per `tick'
    private int x_velocity; // horizonal speed; positive is to the right
    private int y_velocity; // vertical speed; positive is downwards
    public Cannon() {
    velocity = 3;
    angle = 60;
    angle = radians(angle);
    x_pos = 0;
    y_pos = 385;
    /** shoot fires a shot from the cannon*/
    public void shoot(){
    move();
    /**reload reloads the cannon with more shorts*/
    public void reload() {
    /** changeAngle changes the angle of the canon
    * @params value - the amount to add or subtract from the current angle value*/
    public void changeAngle(double value) {
    angle = (double)value;
    angle = radians(angle);
    /** getAngle returns the current angle value of the cannon*/
    public double getAngle() {
    return angle;
    /** changeVelocity changes the speed at which a cannon ball that is to be fire will travel at
    * @params value - the new speed at which the user wants a cannon ball to travel at.*/
    public void changeVelocityX(int value){
    x_velocity = x_velocity * (int)Math.cos(value);
    public void changeVelocityY(int value){
    y_velocity = y_velocity * (int)Math.sin(value);
    /** getVelocity returns the current velocity value of the cannon*/
    public int getVelocityX() {
    return x_velocity;
    public int getVelocityY() {
    return y_velocity;
    /** getGravity returns the current gravity value of the cannon*/
    public double getGravity() {
    return gravity;
    public int xPosition(){
    return x_pos;
    public int yPosition(){
    return y_pos;
    public void move(){
    double dx = getVelocityX() * Math.cos(getAngle());
    double dy = getVelocityY() * Math.sin(getAngle());
    x_pos+=dx;
    y_pos-=dy;
    double radians (double angle){
    return ((Math.PI * angle) / 180.0);
    View:
    import java.awt.*;
    import javax.swing.*;
    /** CannonView displays a cannon being fired.*/
    public class CannonView extends JPanel{
    /** DISPLAY_SIZE specifies the overall display area of the cannon and the bucket.*/
    public static final int DISPLAY_AREA_SIZE = 600;
    public RotatablePolygon rectangle;
    public RotatablePolygon triangle;
    public Cannon cannon;
    public CannonView(Cannon c) {
    this.setPreferredSize(new Dimension(600,450));
    this.setBackground(Color.black);
    cannon = c;
    int xRectangle[] = {0,0,40,40,0};
    int yRectangle[] = {400,300,300,400,400};
    int xTriangle[] = {0,20,40,0};
    int yTriangle[] = {300,280,300,300};
    rectangle = new RotatablePolygon (xRectangle, yRectangle, 5,20,350);
    // rectangle.setPosition (100, 100);
    // triangle = new RotatablePolygon (xTriangle, yTriangle, 4,0,290);
    triangle = new RotatablePolygon (xTriangle, yTriangle, 4,20,350);
    //triangle.setPosition (100, 100);
    JFrame frame = new JFrame();
    frame.getContentPane().add(this);
    frame.pack();
    frame.setVisible(true);
    frame.setTitle("Width = " + frame.getWidth() + " , Height = " + frame.getHeight());
    /** drawBucket draws a bucket/target for which a moving cannon ball should hit.
    * @param g - the graphics pen for which the drawing should occur.*/
    public void drawBucket(Graphics g) {
    g.setColor(Color.red);
    int xvalues[] = {495, 519, 575, 595, 495};
    int yvalues[] = {340, 400, 400, 340, 340};
    Polygon poly1 = new Polygon (xvalues, yvalues, 5);
    g.fillPolygon(poly1);
    g.setColor(Color.white);
    g.fillOval(495, 328, 100, 24);
    Graphics2D g2d = (Graphics2D)g;
    g2d.setStroke(new BasicStroke(2));
    g.setColor(Color.red);
    g.drawOval(495, 328, 100, 24);
    g.drawOval(495,311,100,54);
    /** drawCannon draws a cannon
    * @param g - the graphics pen that will be used to draw the cannon.*/
    public void drawCannon(Graphics g) {
    Graphics2D g2 = (Graphics2D)g;
    g.setColor(Color.red);
    g2.fill(rectangle);
    g.setColor(Color.orange);
    g2.fill(triangle);
    g.setColor(Color.blue);
    g.fillOval(95, 340, 60, 60);
    g.setColor(Color.magenta);
    for (int i = 0; i < 6; i++){
    g.fillArc(95, 340, 60, 60, i* 60, 30);
    g.setColor(Color.black);
    g.fillOval(117, 362, 16, 16);
    /** drawCannonShots will draw the actual number of shots already used by the cannon
    * @param g - the graphics pen that will be used to draw the shots of the cannon.*/
    public void drawCannonShots(Graphics g) {
    g.setColor(Color.orange);
    g.fillOval(cannon.xPosition(),cannon.yPosition(),16,16);
    /** drawTrail will draw a trail of smoke to indicate where a cannon ball has passed
    * @param g - the graphics pen used to draw the trail.*/
    public void drawTrail(Graphics g){}
    /**drawGround draws the ground for which the cannon sits*/
    public void drawGround(Graphics g) {
    g.setColor(Color.green.brighter());
    g.fillRect(0,400,600,50);
    /** drawMovingCannonBall draw a cannon ball moving at a certain speed (velocity),
    * with a certain amount of gravitational acting upon it, at a certain angle.
    * @params g - the graphics pen used to draw the moving cannon ball.
    * @params gravity - the value of gravity.
    * @params velocity - the speed at which the ball is travelling.
    * @params angle - the angle at which the ball was shot from.*/
    public void drawMovingCannonBall(Graphics g, double gravity, double velocity, double angle){}
    /** paintComponent paints the cannon,bucket
    * @param g - graphics pen.*/
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    drawGround(g);
    drawBucket(g);
    drawCannon(g);
    drawCannonShots(g);
    Controller
    /** CannonController controls the interaction between the user and a cannon*/
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class CannonController extends JFrame{
    public JMenuBar jMenuBar2;
    public JMenu jMenu2;
    public JMenuItem jMenuItem1;
    public JMenu jMenu3;
    public JMenuItem jMenuItem2;
    public JLabel angleLabel, velocityLabel;
    public JTextField angleTextField, velocityTextField;
    public JButton fireButton, reloadButton;
    public JSlider angleSlider, velocitySlider;
    private CannonView view;
    private Cannon cannon;
    int oldValue, newValue;
    public CannonController(Cannon acannon) {
    cannon = acannon;
    view = new CannonView(cannon);
    loadControls();
    angleTextField.setText(String.valueOf(angleSlider.getValue()));
    oldValue = angleSlider.getValue();
    newValue = oldValue + 1;
    velocityTextField.setText(String.valueOf(velocitySlider.getValue()));
    this.setSize(328,308);
    this.setLocation(view.getWidth()-this.getWidth(),0);
    /** loadControl loads all of the GUI controls that a
    * user of the cannon animation will use to interact with the program*/
    public void loadControls() {
    jMenuBar2 = new JMenuBar();
    jMenu2 = new JMenu();
    jMenuItem1 = new JMenuItem();
    jMenu3 = new JMenu();
    jMenuItem2 = new JMenuItem();
    angleLabel = new JLabel();
    velocityLabel = new JLabel();
    angleTextField = new JTextField();
    velocityTextField = new JTextField();
    fireButton = new JButton();
    reloadButton = new JButton();
    angleSlider = new JSlider();
    velocitySlider = new JSlider();
    jMenuBar2.setBorderPainted(false);
    jMenu2.setModel(jMenu2.getModel());
    jMenu2.setText("File");
    jMenuItem1.setText("Exit");
    jMenuItem1.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    jMenuItem1ActionPerformed(evt);
    jMenu2.add(jMenuItem1);
    jMenuBar2.add(jMenu2);
    jMenu3.setText("Help");
    jMenuItem2.setText("About this Program");
    jMenuItem2.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    jMenuItem2ActionPerformed(evt);
    jMenu3.add(jMenuItem2);
    jMenuBar2.add(jMenu3);
    getContentPane().setLayout(null);
    setTitle("Cannon Controller Form");
    setResizable(false);
    setMenuBar(getMenuBar());
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent evt) {
    exitForm(evt);
    angleLabel.setText("Angle:");
    getContentPane().add(angleLabel);
    angleLabel.setLocation(10, 20);
    angleLabel.setSize(angleLabel.getPreferredSize());
    velocityLabel.setText("Velocity:");
    getContentPane().add(velocityLabel);
    velocityLabel.setLocation(10, 80);
    velocityLabel.setSize(velocityLabel.getPreferredSize());
    angleTextField.setToolTipText("Only numeric values are allow");
    getContentPane().add(angleTextField);
    angleTextField.setBounds(280, 20, 30, 20);
    velocityTextField.setToolTipText("Only numeric values are allow");
    getContentPane().add(velocityTextField);
    velocityTextField.setBounds(280, 80, 30, 20);
    fireButton.setToolTipText("Click to fire a shot");
    fireButton.setText("Fire");
    fireButton.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent evt) {
    fireButtonMouseClicked(evt);
    getContentPane().add(fireButton);
    fireButton.setBounds(60, 160, 80, 30);
    reloadButton.setToolTipText("Click to reload cannon");
    reloadButton.setText("Reload");
    reloadButton.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent evt) {
    reloadButtonMouseClicked(evt);
    getContentPane().add(reloadButton);
    reloadButton.setBounds(150, 160, 80, 30);
    angleSlider.setMinorTickSpacing(30);
    angleSlider.setPaintLabels(true);
    angleSlider.setPaintTicks(true);
    angleSlider.setMinimum(0);
    angleSlider.setMajorTickSpacing(60);
    angleSlider.setToolTipText("Change the cannon angle");
    angleSlider.setMaximum(360);
    angleSlider.setValue(0);
    angleSlider.addChangeListener(new ChangeListener() {
    public void stateChanged(ChangeEvent evt) {
    angleSliderStateChanged(evt);
    getContentPane().add(angleSlider);
    angleSlider.setBounds(60, 20, 210, 40);
    velocitySlider.setMinorTickSpacing(5);
    velocitySlider.setPaintLabels(true);
    velocitySlider.setPaintTicks(true);
    velocitySlider.setMinimum(1);
    velocitySlider.setMajorTickSpacing(10);
    velocitySlider.setToolTipText("Change the speed of the cannon ball");
    velocitySlider.setMaximum(28);
    velocitySlider.setValue(3);
    velocitySlider.addChangeListener(new ChangeListener() {
    public void stateChanged(ChangeEvent evt) {
    velocitySliderStateChanged(evt);
    getContentPane().add(velocitySlider);
    velocitySlider.setBounds(60, 80, 210, 50);
    setJMenuBar(jMenuBar2);
    pack();
    private void reloadButtonMouseClicked(MouseEvent evt) {
    reloadButtonClick();
    private void fireButtonMouseClicked(MouseEvent evt) {
    fireButtonClick();
    /** firstButtonClick is the event handler that sends a message
    * to the cannon class to invokes the cannon's fire method*/
    public void fireButtonClick() {
    // JOptionPane.showMessageDialog(null,"You click Fire");
    cannon.shoot();
    view.repaint();
    /** reloadButtonClick is the event handler that sends a message
    * to the cannon class to invokes the cannon's reload method*/
    public void reloadButtonClick() {
    JOptionPane.showMessageDialog(null,"reload");
    private void angleSliderStateChanged(ChangeEvent evt) {
    angleTextField.setText(String.valueOf(angleSlider.getValue()));
    view.rectangle.setAngle(angleSlider.getValue() * (Math.PI / 180));
    view.triangle.setAngle(angleSlider.getValue() * (Math.PI / 180));
    cannon.changeAngle(angleSlider.getValue());
    view.repaint();
    private void velocitySliderStateChanged(ChangeEvent evt) {
    velocityTextField.setText(String.valueOf(velocitySlider.getValue()));
    cannon.changeVelocityX(velocitySlider.getValue());
    private void gravitySliderStateChanged(ChangeEvent evt) {
    private void jMenuItem1ActionPerformed(ActionEvent evt) {
    System.exit (0);
    private void jMenuItem2ActionPerformed(ActionEvent evt) {
    String message = "Cannon Animation\n"+
    "Based on the Logic of Projectiles";
    JOptionPane.showMessageDialog(null,message,"About this program",JOptionPane.PLAIN_MESSAGE);
    /** Exit the Application */
    private void exitForm(WindowEvent evt) {
    System.exit (0);
    /** Pause execution for t milliseconds. */
    private void delay (int t) {
    try {
    Thread.sleep (t);
    } catch (InterruptedException e) {}
    public static void main(String [] args){
    Cannon cn = new Cannon();
    CannonController control = new CannonController(cn);
    control.setTitle("Test");
    control.setVisible(true);
    if the cannon ball land in the bucket it should stop and the animation should indicate a 'hit' in some way. maybe by displaying a message.
    if the cannonball hits the outside of the bucket it should bounce off.
    Extra Notes.
    1) The acceleration due to gravity is 9.8m/s to the (power of (2) eg s2.
    2) The distance travelled in time t by a body with initial velocity v under constant acceleration a is:
    v * t + a * t.pow(2) div 2;
    The velocity at the end of time t will be v + a * t.
    Distance is measure in pixels rather than meter so for simplicity we use 1 pixel per meter
    When i pressed the fire button nothings happens. I'm going crazy. Please please help!

    Here is the interface specification for the RotatablePolygon class. I do not have the actual .java source.
    Thanks
    Class RotatablePolygon
    java.lang.Object
    |
    --java.awt.geom.Area
    |
    --RotatablePolygon
    All Implemented Interfaces:
    java.lang.Cloneable, java.awt.Shape
    public class RotatablePolygon
    extends java.awt.geom.Area
    Polygons which can be rotated around an `anchor' point and also translated (moved in the x and y directions).
    Constructor Summary
    RotatablePolygon(int[] xs, int[] ys, int n, double x, double y)
    Create a new RotatablePolyogon with given vertices and anchor point (x,y).
    Method Summary
    double getAngle()
    The current angle of rotation.
    double getXanchor()
    x-coordinate of the anchor point.
    double getYanchor()
    y-coordinate of the anchor point.
    void rotate(double da)
    Rotate the polygon from its current position by angle da (in radians) around the anchor.
    void rotateDegrees(double da)
    Rotate the polygon from its current position by angle da (in degrees) around the anchor.
    void setAngle(double a)
    Set the angle of rotation of the polygon to be angle a (in radians) around the anchor.
    void setAngleDegrees(double a)
    Set the angle of rotation of the polygon to be angle a (in degrees) around the anchor.
    void setPosition(double x, double y)
    Shift the polygon's position to put its anchor point at (x,y).
    void translate(double dx, double dy)
    Shift the polygon's position and anchor point by given amounts.
    Methods inherited from class java.awt.geom.Area
    add, clone, contains, contains, contains, contains, createTransformedArea, equals, exclusiveOr, getBounds, getBounds2D, getPathIterator, getPathIterator, intersect, intersects, intersects, isEmpty, isPolygonal, isRectangular, isSingular, reset, subtract, transform
    Methods inherited from class java.lang.Object
    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    Constructor Detail
    RotatablePolygon
    public RotatablePolygon(int[] xs,
    int[] ys,
    int n,
    double x,
    double y)
    Create a new RotatablePolyogon with given vertices and anchor point (x,y).
    REQUIRE: xs.length >= n && ys.length >= n
    Parameters:
    xs - x-coordinates of vertices
    ys - y-coordinates of vertices
    n - number of vertices
    x - x-coordinate of the rotation anchor
    y - y-coordinate of the rotation anchor
    Method Detail
    setPosition
    public void setPosition(double x,
    double y)
    Shift the polygon's position to put its anchor point at (x,y).
    Parameters:
    x - new x-coordinate for anchor point
    y - new y-coordinate for anchor point
    translate
    public void translate(double dx,
    double dy)
    Shift the polygon's position and anchor point by given amounts.
    Parameters:
    dx - amount to shift by in x-direction
    dy - amount to shift by in y-direction
    setAngle
    public void setAngle(double a)
    Set the angle of rotation of the polygon to be angle a (in radians) around the anchor.
    Parameters:
    a - angle to rotate to, in radians
    setAngleDegrees
    public void setAngleDegrees(double a)
    Set the angle of rotation of the polygon to be angle a (in degrees) around the anchor.
    Parameters:
    a - angle to rotate to, in degrees
    rotate
    public void rotate(double da)
    Rotate the polygon from its current position by angle da (in radians) around the anchor.
    Parameters:
    da - angle to rotate by, in radians
    rotateDegrees
    public void rotateDegrees(double da)
    Rotate the polygon from its current position by angle da (in degrees) around the anchor.
    Parameters:
    da - angle to rotate by, in degrees
    getAngle
    public double getAngle()
    The current angle of rotation.
    getXanchor
    public double getXanchor()
    x-coordinate of the anchor point.
    getYanchor
    public double getYanchor()
    y-coordinate of the anchor point.

  • Please Help with Physics Project Here are the codings

    I've got three(3) classes a Model, a view, and a controller.
    This is a project about projectiles.it is an animation of a cannonball being fired from a cannon and travelling under the effect of gravity.A cannon fired at angle 'a' to the horizontal and with an initial speed 's', will have an initial velocity given by:
    vx := s * cos(a);//velocity x equals the speed multiply by the cosine of angle a.
    vy := s * sin(a);//velocity y equals the speed multiply by the sine of angle a.
    Here are the code.
    Model:
    /** Cannon specifies the expected behaviour of a cannon*/
    public class Cannon{
    public static final int TICK = 60;
    private int velocity = 0;
    private static final double gravity = .098f;
    private double angle = 0;
    // distances & positions are meausred in pixels
    private int x_pos; // ball's center x-position
    private int y_pos; // ball's center y-position
    // speed is measured in pixels per `tick'
    private int x_velocity; // horizonal speed; positive is to the right
    private int y_velocity; // vertical speed; positive is downwards
    public Cannon() {
    velocity = 3;
    angle = 60;
    angle = radians(angle);
    x_pos = 0;
    y_pos = 385;
    /** shoot fires a shot from the cannon*/
    public void shoot(){
    move();
    /**reload reloads the cannon with more shorts*/
    public void reload() {
    /** changeAngle changes the angle of the canon
    * @params value - the amount to add or subtract from the current angle value*/
    public void changeAngle(double value) {
    angle = (double)value;
    angle = radians(angle);
    /** getAngle returns the current angle value of the cannon*/
    public double getAngle() {
    return angle;
    /** changeVelocity changes the speed at which a cannon ball that is to be fire will travel at
    * @params value - the new speed at which the user wants a cannon ball to travel at.*/
    public void changeVelocityX(int value){
    x_velocity = x_velocity * (int)Math.cos(value);
    public void changeVelocityY(int value){
    y_velocity = y_velocity * (int)Math.sin(value);
    /** getVelocity returns the current velocity value of the cannon*/
    public int getVelocityX() {
    return x_velocity;
    public int getVelocityY() {
    return y_velocity;
    /** getGravity returns the current gravity value of the cannon*/
    public double getGravity() {
    return gravity;
    public int xPosition(){
    return x_pos;
    public int yPosition(){
    return y_pos;
    public void move(){
    double dx = getVelocityX() * Math.cos(getAngle());
    double dy = getVelocityY() * Math.sin(getAngle());
    x_pos+=dx;
    y_pos-=dy;
    double radians (double angle){
    return ((Math.PI * angle) / 180.0);
    View:
    import java.awt.*;
    import javax.swing.*;
    /** CannonView displays a cannon being fired.*/
    public class CannonView extends JPanel{
    /** DISPLAY_SIZE specifies the overall display area of the cannon and the bucket.*/
    public static final int DISPLAY_AREA_SIZE = 600;
    public RotatablePolygon rectangle;
    public RotatablePolygon triangle;
    public Cannon cannon;
    public CannonView(Cannon c) {
    this.setPreferredSize(new Dimension(600,450));
    this.setBackground(Color.black);
    cannon = c;
    int xRectangle[] = {0,0,40,40,0};
    int yRectangle[] = {400,300,300,400,400};
    int xTriangle[] = {0,20,40,0};
    int yTriangle[] = {300,280,300,300};
    rectangle = new RotatablePolygon (xRectangle, yRectangle, 5,20,350);
    // rectangle.setPosition (100, 100);
    // triangle = new RotatablePolygon (xTriangle, yTriangle, 4,0,290);
    triangle = new RotatablePolygon (xTriangle, yTriangle, 4,20,350);
    //triangle.setPosition (100, 100);
    JFrame frame = new JFrame();
    frame.getContentPane().add(this);
    frame.pack();
    frame.setVisible(true);
    frame.setTitle("Width = " + frame.getWidth() + " , Height = " + frame.getHeight());
    /** drawBucket draws a bucket/target for which a moving cannon ball should hit.
    * @param g - the graphics pen for which the drawing should occur.*/
    public void drawBucket(Graphics g) {
    g.setColor(Color.red);
    int xvalues[] = {495, 519, 575, 595, 495};
    int yvalues[] = {340, 400, 400, 340, 340};
    Polygon poly1 = new Polygon (xvalues, yvalues, 5);
    g.fillPolygon(poly1);
    g.setColor(Color.white);
    g.fillOval(495, 328, 100, 24);
    Graphics2D g2d = (Graphics2D)g;
    g2d.setStroke(new BasicStroke(2));
    g.setColor(Color.red);
    g.drawOval(495, 328, 100, 24);
    g.drawOval(495,311,100,54);
    /** drawCannon draws a cannon
    * @param g - the graphics pen that will be used to draw the cannon.*/
    public void drawCannon(Graphics g) {
    Graphics2D g2 = (Graphics2D)g;
    g.setColor(Color.red);
    g2.fill(rectangle);
    g.setColor(Color.orange);
    g2.fill(triangle);
    g.setColor(Color.blue);
    g.fillOval(95, 340, 60, 60);
    g.setColor(Color.magenta);
    for (int i = 0; i < 6; i++){
    g.fillArc(95, 340, 60, 60, i* 60, 30);
    g.setColor(Color.black);
    g.fillOval(117, 362, 16, 16);
    /** drawCannonShots will draw the actual number of shots already used by the cannon
    * @param g - the graphics pen that will be used to draw the shots of the cannon.*/
    public void drawCannonShots(Graphics g) {
    g.setColor(Color.orange);
    g.fillOval(cannon.xPosition(),cannon.yPosition(),16,16);
    /** drawTrail will draw a trail of smoke to indicate where a cannon ball has passed
    * @param g - the graphics pen used to draw the trail.*/
    public void drawTrail(Graphics g){}
    /**drawGround draws the ground for which the cannon sits*/
    public void drawGround(Graphics g) {
    g.setColor(Color.green.brighter());
    g.fillRect(0,400,600,50);
    /** drawMovingCannonBall draw a cannon ball moving at a certain speed (velocity),
    * with a certain amount of gravitational acting upon it, at a certain angle.
    * @params g - the graphics pen used to draw the moving cannon ball.
    * @params gravity - the value of gravity.
    * @params velocity - the speed at which the ball is travelling.
    * @params angle - the angle at which the ball was shot from.*/
    public void drawMovingCannonBall(Graphics g, double gravity, double velocity, double angle){}
    /** paintComponent paints the cannon,bucket
    * @param g - graphics pen.*/
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    drawGround(g);
    drawBucket(g);
    drawCannon(g);
    drawCannonShots(g);
    Controller
    /** CannonController controls the interaction between the user and a cannon*/
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class CannonController extends JFrame{
    public JMenuBar jMenuBar2;
    public JMenu jMenu2;
    public JMenuItem jMenuItem1;
    public JMenu jMenu3;
    public JMenuItem jMenuItem2;
    public JLabel angleLabel, velocityLabel;
    public JTextField angleTextField, velocityTextField;
    public JButton fireButton, reloadButton;
    public JSlider angleSlider, velocitySlider;
    private CannonView view;
    private Cannon cannon;
    int oldValue, newValue;
    public CannonController(Cannon acannon) {
    cannon = acannon;
    view = new CannonView(cannon);
    loadControls();
    angleTextField.setText(String.valueOf(angleSlider.getValue()));
    oldValue = angleSlider.getValue();
    newValue = oldValue + 1;
    velocityTextField.setText(String.valueOf(velocitySlider.getValue()));
    this.setSize(328,308);
    this.setLocation(view.getWidth()-this.getWidth(),0);
    /** loadControl loads all of the GUI controls that a
    * user of the cannon animation will use to interact with the program*/
    public void loadControls() {
    jMenuBar2 = new JMenuBar();
    jMenu2 = new JMenu();
    jMenuItem1 = new JMenuItem();
    jMenu3 = new JMenu();
    jMenuItem2 = new JMenuItem();
    angleLabel = new JLabel();
    velocityLabel = new JLabel();
    angleTextField = new JTextField();
    velocityTextField = new JTextField();
    fireButton = new JButton();
    reloadButton = new JButton();
    angleSlider = new JSlider();
    velocitySlider = new JSlider();
    jMenuBar2.setBorderPainted(false);
    jMenu2.setModel(jMenu2.getModel());
    jMenu2.setText("File");
    jMenuItem1.setText("Exit");
    jMenuItem1.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    jMenuItem1ActionPerformed(evt);
    jMenu2.add(jMenuItem1);
    jMenuBar2.add(jMenu2);
    jMenu3.setText("Help");
    jMenuItem2.setText("About this Program");
    jMenuItem2.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    jMenuItem2ActionPerformed(evt);
    jMenu3.add(jMenuItem2);
    jMenuBar2.add(jMenu3);
    getContentPane().setLayout(null);
    setTitle("Cannon Controller Form");
    setResizable(false);
    setMenuBar(getMenuBar());
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent evt) {
    exitForm(evt);
    angleLabel.setText("Angle:");
    getContentPane().add(angleLabel);
    angleLabel.setLocation(10, 20);
    angleLabel.setSize(angleLabel.getPreferredSize());
    velocityLabel.setText("Velocity:");
    getContentPane().add(velocityLabel);
    velocityLabel.setLocation(10, 80);
    velocityLabel.setSize(velocityLabel.getPreferredSize());
    angleTextField.setToolTipText("Only numeric values are allow");
    getContentPane().add(angleTextField);
    angleTextField.setBounds(280, 20, 30, 20);
    velocityTextField.setToolTipText("Only numeric values are allow");
    getContentPane().add(velocityTextField);
    velocityTextField.setBounds(280, 80, 30, 20);
    fireButton.setToolTipText("Click to fire a shot");
    fireButton.setText("Fire");
    fireButton.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent evt) {
    fireButtonMouseClicked(evt);
    getContentPane().add(fireButton);
    fireButton.setBounds(60, 160, 80, 30);
    reloadButton.setToolTipText("Click to reload cannon");
    reloadButton.setText("Reload");
    reloadButton.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent evt) {
    reloadButtonMouseClicked(evt);
    getContentPane().add(reloadButton);
    reloadButton.setBounds(150, 160, 80, 30);
    angleSlider.setMinorTickSpacing(30);
    angleSlider.setPaintLabels(true);
    angleSlider.setPaintTicks(true);
    angleSlider.setMinimum(0);
    angleSlider.setMajorTickSpacing(60);
    angleSlider.setToolTipText("Change the cannon angle");
    angleSlider.setMaximum(360);
    angleSlider.setValue(0);
    angleSlider.addChangeListener(new ChangeListener() {
    public void stateChanged(ChangeEvent evt) {
    angleSliderStateChanged(evt);
    getContentPane().add(angleSlider);
    angleSlider.setBounds(60, 20, 210, 40);
    velocitySlider.setMinorTickSpacing(5);
    velocitySlider.setPaintLabels(true);
    velocitySlider.setPaintTicks(true);
    velocitySlider.setMinimum(1);
    velocitySlider.setMajorTickSpacing(10);
    velocitySlider.setToolTipText("Change the speed of the cannon ball");
    velocitySlider.setMaximum(28);
    velocitySlider.setValue(3);
    velocitySlider.addChangeListener(new ChangeListener() {
    public void stateChanged(ChangeEvent evt) {
    velocitySliderStateChanged(evt);
    getContentPane().add(velocitySlider);
    velocitySlider.setBounds(60, 80, 210, 50);
    setJMenuBar(jMenuBar2);
    pack();
    private void reloadButtonMouseClicked(MouseEvent evt) {
    reloadButtonClick();
    private void fireButtonMouseClicked(MouseEvent evt) {
    fireButtonClick();
    /** firstButtonClick is the event handler that sends a message
    * to the cannon class to invokes the cannon's fire method*/
    public void fireButtonClick() {
    // JOptionPane.showMessageDialog(null,"You click Fire");
    cannon.shoot();
    view.repaint();
    /** reloadButtonClick is the event handler that sends a message
    * to the cannon class to invokes the cannon's reload method*/
    public void reloadButtonClick() {
    JOptionPane.showMessageDialog(null,"reload");
    private void angleSliderStateChanged(ChangeEvent evt) {
    angleTextField.setText(String.valueOf(angleSlider.getValue()));
    view.rectangle.setAngle(angleSlider.getValue() * (Math.PI / 180));
    view.triangle.setAngle(angleSlider.getValue() * (Math.PI / 180));
    cannon.changeAngle(angleSlider.getValue());
    view.repaint();
    private void velocitySliderStateChanged(ChangeEvent evt) {
    velocityTextField.setText(String.valueOf(velocitySlider.getValue()));
    cannon.changeVelocityX(velocitySlider.getValue());
    private void gravitySliderStateChanged(ChangeEvent evt) {
    private void jMenuItem1ActionPerformed(ActionEvent evt) {
    System.exit (0);
    private void jMenuItem2ActionPerformed(ActionEvent evt) {
    String message = "Cannon Animation\n"+
    "Based on the Logic of Projectiles";
    JOptionPane.showMessageDialog(null,message,"About this program",JOptionPane.PLAIN_MESSAGE);
    /** Exit the Application */
    private void exitForm(WindowEvent evt) {
    System.exit (0);
    /** Pause execution for t milliseconds. */
    private void delay (int t) {
    try {
    Thread.sleep (t);
    } catch (InterruptedException e) {}
    public static void main(String [] args){
    Cannon cn = new Cannon();
    CannonController control = new CannonController(cn);
    control.setTitle("Test");
    control.setVisible(true);
    if the cannon ball land in the bucket it should stop and the animation should indicate a 'hit' in some way. maybe by displaying a message.
    if the cannonball hits the outside of the bucket it should bounce off.
    Extra Notes.
    1) The acceleration due to gravity is 9.8m/s to the (power of (2) eg s2.
    2) The distance travelled in time t by a body with initial velocity v under constant acceleration a is:
    v * t + a * t.pow(2) div 2;
    The velocity at the end of time t will be v + a * t.
    Distance is measure in pixels rather than meter so for simplicity we use 1 pixel per meter
    When i pressed the fire button nothings happens. I'm going crazy. Please please help!

    Hi,
    U put something on forum and keeping silence.If it is not necessary dont put in forum.I moved your cannon ball.If u want continous movement I need some more information.
    Johnson

  • [ETL]Could you please help with a problem accessing UML stereotype attributes ?

    Hi all,
    Could you please help with a problem accessing UML stereotype attributes and their values ?
    Here is the description :
    -I created a UML model with Papyrus tool and I applied MARTE profile to this UML model.
    -Then, I applied <<PaStep>> stereotype to an AcceptEventAction ( which is one of the element that I created in this model ), and set the extOpDemand property of the stereotype to 2.7 with Papyrus.
    -Now In the ETL file, I can find the stereotype property of extOpDemand as follows :
    s.attribute.selectOne(a|a.name="extOpDemand") , where s is a variable of type Stereotype.
    -However I can't access the value 2.7 of the extOpDemand attribute of the <<PaStep>> Stereotype. How do I do that ?
    Please help
    Thank you

    Hi Dimitris,
    Thank you , a minimal example is provided now.
    Version of the Epsilon that I am using is : ( Epsilon Core 1.2.0.201408251031 org.eclipse.epsilon.core.feature.feature.group Eclipse.org)
    Instructions for reproducing the problem :
    1-Run the uml2etl.etl transformation with the supplied launch configuration.
    2-Open lqn.model.
    There are two folders inside MinimalExample folder, the one which is called MinimalExample has 4 files, model.uml , lqn.model, uml2lqn.etl and MinimalExampleTransformation.launch.
    The other folder which is LQN has four files. (.project),LQN.emf,LQN.ecore and untitled.model which is an example model conforming to the LQN metamodel to see how the model looks like.
    Thank you
    Mana

  • Please help with slideshow problems!

    Am using Photoshop Elements 8 and trying to make a slideshow. Have tried 4 times now and keep ending up with same problem, cannot reopen project to continue edititing.  Won't show up in orginizer and when I find on harddrive and try to open get message " wmv file cannot be opened".  How can I save a
    slideshow inprogress and be able to reopen and continue to edit and make slideshow?  I want to thank anyone who can help me with this in advance as I
    have gotten so frustrated that I want to just scream.
    Thanks

    Thanks for the help, thought I had done so but maybe not.  Anyway will have another go at it, now may I ask another
    question?  I am trying to add audio to slideshow.  I have some music I purchased thru amazon as mp3 files but I get
    message no codec and when I try to add wmv I get same message.  What type of file do I need and how can I add
    multiple songs to one slideshow.   I have one little wmv file that will go in, but it just replicates itself multiple times until
    it fills slide show. 
    Thanks again, sorry to be a bother, but this thing is driving this old man crazy.
    Date: Sun, 26 Dec 2010 20:34:32 -0700
    From: [email protected]
    To: [email protected]
    Subject: Please help with slideshow problems!
    You need to save the slideshow project in order to be able to go back later and make changes or additions to an existing slideshow . The wmv file is a final output format.
    Now you are most probably using only the Output command: that is what makes the wmv file.
    You should also do the Save Project command. (and I make it a practice to do the Save Project command before I do the Output command).
    If you look at the Elements Organizer 8 Help, there is a topic on "Create a slide show".
    -- Very close to the beginning of that topic is a screen shot of the Sldie Show Editor screen,
    -- The bar below the usual menu bar is labeled with a "B" and called the Shortcuts bar.
    -- The 1st entry on that Shortcuts bar is "Save Project"
    It is the Save Project command that saves the information about which photos, audio, etc you placed in that specific slide show so that you can come back again to do subsequent editing.  Save each Project with a unique name.
    After completing the Save Project command, you shoud see an "icon" in the Organizer for that slide show.
    Note:  you must also keep the photo files and audio files which you have used in this slide show: you can't delete them because the project file does NOT contain a copy of the photos, it only has the identification and folder location of the photo and audio files.
    >

  • HT5824 I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. Please help with turning my iMessage completely off..

    I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. I have no problem sending the text messages but I'm not receivng any from iPhones at all. It has been about a week now that I'm having this problem. I've already tried fixing it myself and I also went into the sprint store, they tried everything as well. My last option was to contact Apple directly. Please help with turning my iMessage completely off so that I can receive my texts.

    If you registered your iPhone with Apple using a support profile, try going to https://supportprofile.apple.com/MySupportProfile.do and unregistering it.  Also, try changing the password associated with the Apple ID that you were using for iMessage.

  • How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore. Please help with proper steps, if any.

    How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore.
    On the new computer, I am getting a message that my all purchases would be deleted if I sync it with new iTunes library.
    Please help with proper steps, if any.

    Also see... these 2 Links...
    Recovering your iTunes library from your iPod or iOS device
    https://discussions.apple.com/docs/DOC-3991
    Syncing to a New Computer...
    https://discussions.apple.com/docs/DOC-3141

  • Please help with "You can't open the application NovamediaDiskSupressor because PowerPC applications are no longer supported." I have seen other responses on this but am not a techie and would not know how to start with that solution.

    Please help with the message I am receving on startup ""You can't open the application NovamediaDiskSupressor because PowerPC applications are no longer supported."
    I have read some of the replies in the Apple Support Communities, but as I am no techie, I would have no idea how I would implement that solution.
    Please help with what I need to type, how, where, etc.
    Many thanks
    AppleSueIn HunterCreek

    I am afraid there is no solution.
    PowerPC refers to the processing chip used by Apple before they transferred to Intel chips. They are very different, and applications written only for PPC Macs cannot work on a Mac running Lion.
    You could contact the developers to see if they have an updated version in the pipeline.

  • Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be ab

    Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be able to download the srtony adobe.

    Adobe - Lightroom : For Macintosh
    Hal

  • Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Upgrade to 11.2.0.3 -- Interoperability Notes Oracle EBS R12 with Oracle Database 11gR2 (11.2.0.3) (Doc ID 1585578.1)
    Upgrade to 11.2.0.4 (latest 11gR2 patchset certified with R12) -- Interoperability Notes EBS 12.0 and 12.1 with Database 11gR2 (Doc ID 1058763.1)
    Thanks,
    Hussein

  • Welcome. At the outset, I'm sorry for my English :) Please help with configuration Photoshop CS6 appearance. How to disable the background of the program so you can see the desktop. (same menus and tools) Chiałbym to be the same effect as CS5.

    Welcome.
    At the outset, I'm sorry for my English
    Please help with configuration Photoshop CS6 appearance.
    How to disable the background of the program so you can see the desktop. (same menus and tools)
    i wantto be the same effect as CS5.

    Please try turning off
    Window > Application Frame

  • HT201210 cont contact apple server error please help with ipad touch 4. im just fed up with apple please help me because why is it only apple with these kind of problems?

    cont contact apple server error please help with ipad touch 4. im just fed up with apple please help me because why is it only apple with these kind of problems?

    If you mean updae server
    Update Server
    Try:
    - Powering off and then back on your router.
    - iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    - Change the DNS to either Google's or Open DNS servers
    Public DNS — Google Developers
    OpenDNS IP Addresses
    - For one user uninstalling/reinstalling iTunes resolved the problem
    - Try on another computer/network
    - Wait if it is an Apple problem
    Otherwise what server are you talking about

  • HT3209 Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work

    Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work

    You will need to contact the movie studio that produced the DVD and ask if they can issue you a new code valid for Canada. Apple cannot help you, and everyone here in these forums is just a fellow user.
    Regards.

  • Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hello Priyanks,
    I found an article with steps you can take to troubleshoot issues with an iPhone not connecting to your car stereo:
    iOS: Troubleshooting car stereo connections
    http://support.apple.com/kb/TS3581
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    Following the fix here worked for me:
    https://discussions.apple.com/message/15680566#15680566
    except my plist file was in ~/Library instead of /Library.
    -Scott

Maybe you are looking for

  • Ubuntu 13.10 on U410 - Fn keys don't work

    Dual-booting Windows 8 and Ubuntu 13.10. In Ubuntu the Fn>Function Key combination doesn't work - e.g. F11 to make browser full screen doesn't work. Any one seen this, and is there a fix? (The non-Fn key functions work perfectly well....)

  • TV Remote Control navigation problem

    I have created slide shows and burned them to DVD (using "Burn DVD") The end use will be on TV with remote control. After inserting the DVD into a TV, I can select a slide show and move through it successfully with the "Play" button of the TV remote

  • IPhoto/iDVD Slideshow Software Options?

    I have been unhappy with the resultant quality of slideshows that I have created in iPhoto and exported ('shared') with iDVD. The iPhoto quality is outstanding but I find significant quality degradation in iDVD in terms of clarity and smoothness of K

  • Form Layout design

    Hi All , As i have not done something like this before i have forced my self to ask all you, please guide me. I have 2 tabbed form , 1 tab is displaying data in tabular format and another tab in Form format. 2nd tab is wider than 1st one. So can anyo

  • Get iview ID in runtime

    Hi, I have one iview in content area and footer is same for all the iviews displaying in content area. I got one link in footer which opens a document. This  document is specific to the iview displayed in contentarea, so i need to get ID of an iview