Array problem, why aren't the object references being stored?

Hi,
I have a ClassRoom class, in its constructor I instantiate an array:
public class ClassRoom {
    public Teacher teacher;
    public Student[] studentList;
public ClassRoom() {
        teacher = null;
        studentList[0] = new Student();
        studentList[1] = new Student();
        studentList[2] = new Student();
        studentList[3] = new Student();
        studentList[4] = new Student();
        studentList[5] = new Student();
        studentList[6] = new Student();
        studentList[7] = new Student();
        studentList[8] = new Student();
        studentList[9] = new Student();For some reason the Array is not being filled with Student objects, here is the constructor for the Student class:
public Student() {
        name = studentFirstName[rand1] + studentLastName1[rand2] + studentLastName2[rand3];
        gender = studentGender[rand4];
        year = 1;
        learnAbility = learnAbilityNum[rand5];
        maths = randMaths.nextInt(10) + 1;
        english = randEnglish.nextInt(10) + 1;
        science = randScience.nextInt(10) + 1;
        happy = 8;
        attentionSpan = attentionSpanNum[rand9];Any suggestions? I keep getting nullExceptionPointer errors.
Edited by: drew22299 on Dec 25, 2007 10:18 AM

public Student[] studentList;
    public Student[] studentList = new Student[10];

Similar Messages

  • Mac OSX SUS - Why aren't the latest updates offered for some software

    For instance, on my sus, Quicktime 7.6.4 is the latest version offered for leopard. 7.6.6 is available on Apple's site. Is there actually a 7.6.6 update others can see on their sus, or is this a universal issue - and why aren't the latest updates available?
    Thanks

    I just checked my 10.6.3 SUS server at it appears to have that Quicktime 7.6.6 update listed. The size is listed as 68.5 MB and the post date is 03/30/10. My SUS Server Admin interface shows a "Last Check" time of Apr 13, 2010 3:00:00 AM.
    I have wiped and reinstalled my SUS server several times dealing with the "missing 10.6.3" updates bug reported many times in these forums so that may be why my server is displaying the Quicktime 7.6.6 update.

  • Regenerate the Object Reference in workflow

    Hi All
    Is it possible to regenerate the object reference in workflow BOR.
    Please clarify below my query.
    I am using custom workflow at initial stage i am sending dialog work item one user to another user, Once user opens his work item i want to change the object reference.
    Is these any function module available please let me know.
    Thanks & Regards
    K.Gunasekar.

    Did it via the Call transaction and BDC in the object method code and working perfectly fine.
    Regards,
    Archana

  • Line Chart: It is possible to get the object reference from a flash chart

    Hi Folks,
    hope you feel well ...
    I wan't to get the Object Reference from a Chart Flash Object using javascript in the HTML Header of a Apex Page.
    It's long time ago with Oracle/Java and so my skills are really shity :-)
    The Functionbody works, but the following error occurs: chart.refresh is not a function
    It is necessary to CAST it ? with the Class AnyChart.js ?
    After 5 hours i give up ^^ is this kind of object handling possible ? THX4HELP@ll
    Apex Page HTML Header
    <script type="text/javascript">
    function hideSID2()
    var chart = document.getElementById("*c7067437546726610*");
    chart.refresh();
    </script>
    HTML File at runtime:
    <div class="rc-body"><div class="rc-body-r"><div class="rc-content-main"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    width="1400"
    height="600"
    id="c7067437546726610"
    align="top"> ...

    If you are using adobe Flex Builder to develop SWF, please be sure using ExternalInterface class to expose the refresh() method.
    then you can should be able to call this method in Javascript.

  • Need to sort an object array using an element in the object.

    hi all,
    i need to sort an object array using an element in the object.can someone throw some light on this.
    Edited by: rageeth on Jun 14, 2008 2:32 AM

    [http://java.sun.com/docs/books/tutorial/collections/interfaces/order.html]

  • To pass parameter values to the object reference of action step in sequence file of teststand programatically using C#.

    //Initialize the Engine
                EngineClass myEngine = new EngineClass();
                myEngine.LoadTypePaletteFilesEx(TypeConflictHandlerTypes.ConflictHandler_Prompt, 0);
                Step myStep = myEngine.NewStep(AdapterKeyNames.DotNetAdapterKeyname,StepTypes.StepType_Action);
                myStep.Name = "object";
                DotNetModule dotnetmodule = myStep.Module as DotNetModule;
                dotnetmodule.SetAssembly(DotNetModuleAssemblyLocations.DotNetModule_AssemblyLocation_File,@"C:sequence.dll");
                dotnetmodule.ClassName = "CN";
                dotnetmodule.MemberType = DotNetModuleMemberTypes.DotNetMember_GetProperty;
                dotnetmodule.MemberName = "ISI";  
    mySequence.Locals.NewSubProperty("object", PropertyValueTypes.PropValType_Reference, false, "", 0);        
    Sequence mySequence = myEngine.NewSequence();
                mySequence.Locals.NewSubProperty(varName, PropertyValueTypes.PropValType_Reference, false, String.Empty, 0);
    mySequence.InsertStep(myStep, 0, StepGroups.StepGroup_Main);
                SequenceFile seqFile = myEngine.NewSequenceFile();
                seqFile.InsertSequence(mySequence);
    seqFile.Save("C:\\mySeq.seq");
    I have done this,dynamically creating a sequence file in teststand programatically through c#.
    Problem is
    1.I created an action step and object Reference variable for the step, but i am not able to pass  parameter values to the objectReference 
    2.I am not able to load the sequence in to the main Sequence of the sequence file in the teststand. How can I do these two things.

    Hi,
    have you ever followed on my Links ?!?!?
    If not please jump to this one
    http://forums.ni.com/ni/board/message?board.id=330&thread.id=26880 
    and read the the answer from Mannoch
    starting with this words:
    Anthony -
    Currently, functionality for retrieving the Metadata Token for a class constructor or member is not fully provided in the TestStand .NET Adapter API. The DotNetModule.GetConstructorMetadataToken() and DotNetModule.GetMetadataToken() methods only return the correct Metadata Token when the member/constructor prototypes have already been loaded. Thus, in the case of your code, when you call DotNetModule.GetMetadataToken(), the method is returning -1 because the member prototype for the Step you are referring to has not yet been loaded.
    That means have to do a workaround for your stuff.
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • Problem with copy of the object

    Hi,
    trying to copy (clone) my object:
    var a:TestObj = new TestObj()
    var a2:TestObj = ObjectUtil.copy( a ) as TestObj;
    but i recieve nothing. So the ObjectUtil.copy can return me
    only the Object type, but i want a concrete type!!!
    Is it possible?

    It seems your dealing with request scoped object(s). So you should be safe with respect to the multiple threads.

  • Inserting Flash Problem no ID in the object tag

    Notice the id property in the object tag.
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
    rsion=7,0,19,0" width="550" height="400" id="source2">
    Well Contribute is not inserting this tag. Therefore the
    flash movie will not
    run the folowing (Flash Action Script):
    import flash.external.ExternalInterface;
    theURL = ExternalInterface.call("getLocation");
    Anyone know what to do?

    this post already this repeating with this goes 2 times in
    that link is the same post
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=303&threadid=1162346&en terthread=y

  • Script to copy all the objects within a Stored Procedure

    I am trying to copy all the objects from one database to another using Scripts. Now I need to put that script inside a Stored Procedure.
    Thanks.

    Refer this vbscript to generate all object scripts programatically,
    http://www.codeproject.com/Articles/16195/How-to-Script-Out-SQL-Server-Objects
    or
    Using SSMS
    http://msdn.microsoft.com/en-IN/library/hh245282.aspx#GenPubScriptWiz
    Regards, RSingh

  • How does the Object Reference change in this code ?

    Hi Folks,
    This is my code :
    package assignments;
    class Value
         public int i = 15;
    } //Value
    public class Assignment15
         public static void main(String argv[])
              Assignment15 t = new Assignment15();
              t.first();
         public void first()
              int i = 5;
              Value v = new Value();
              v.i = 25;
              second(v, i);
              System.out.println(v.i);
         public void second(Value v, int i)
              i = 0;
              v.i = 20;
              Value val = new Value();
              v = val;
              System.out.println(v.i + " " + i);
    } // Test
    O/P :
    15 0
    20The output I expected was 15 0 15.
    If the value object created in the second() assigns the value 15 to variable v,why does v.i in the last sysout print 20 ?
    Thank you for your consideration.

         public void second(Value v, int i)
              i = 0;
              v.i = 20;
              Value val = new Value();
              v = val;
              System.out.println(v.i + " " + i);
         }There are two sources of confusion in this code:
    1) for clarity, you shouldn't name second()'s argument "v"; as pbrockway points out, this variable v is a completely different variable from first()'s "v" variable, it just happens to contain a reference to the same object as first()'s "v". Rename the argument to "v2" and it should clarify things (note: this is not a general recommendation, this naming is perfectly valid and makes sense, just not to you yet).
    2) You are assigning a new value (the reference denoted by "val") to the argument variable v. That is bad practice (even for seasoned Java developers).Although the Java compiler accepts it gladly, it brings confusion: it does change the value of the "local variable" v2, but doesn't change the value of the variable "v" in method first(), from which v2 was copied when invoking second().
    Indeed I've seen coding conventions that recommend to add a "final" specifier in front of method arguments, this way:
           public void second(final Value v, int i)
              i = 0;
              v.i = 20;
              Value val = new Value();
              v = val; // does not compile
              System.out.println(v.i + " " + i);
         }This way the compiler rejects the v=val assignment: if you want to do something similar to your previouscode, you have to introduce a new local variable, that is, local to second()'s body, and clearly unknown to first().
    Consider the new code after implementing my suggestions: does it clear the doubts?
    package assignments;
    class Value
         public int i = 15;
    } //Value
    public class Assignment15
         public static void main(String argv[])
              Assignment15 t = new Assignment15();
              t.first();
         public void first()
              int i = 5;
              Value v = new Value();
              v.i = 25;
              second(v, i);
              System.out.println(v.i);
         public void second(final Value v2, int i)
              i = 0;
              v2.i = 20;
              Value val = new Value();
              Value anotherValueVariableWhichDoesNotEscapeThisMethod = val;
              System.out.println(v2.i + " " + i);
              System.out.println(anotherValueVariableWhichDoesNotEscapeThisMethod.i + " " + i);
    } // Test

  • [SOLVED] Why aren't the MIT/BSD licenses in the license package?

    The PKGBUILD Wiki page states that
    The BSD, MIT, zlib/png and Python licenses are special cases and could not be included in the licenses package.
    Can someone explain why this is?  I rather like both the BSD and MIT licenses.
    Last edited by pgoetz (2014-03-31 20:38:00)

    Maybe you should read the entire section!
    The BSD, MIT, zlib/png and Python licenses are special cases and could not be included in the licenses package. For the sake of the license array, it is treated as a common license (license=('BSD'), license=('MIT'), license=('ZLIB') and license=('Python')) but technically each one is a custom license because each one has its own copyright line. Any packages licensed under these four should have its own unique license stored in /usr/share/licenses/pkgname. Some packages may not be covered by a single license. In these cases, multiple entries may be made in the license array, e.g. license=('GPL' 'custom:name of license').
    "but technically each one is a custom license because each one has its own copyright line."

  • Why aren't the Balls Bouncing  ? HELP !

    Dear Java People,
    In doing a program that should have balls bouncing, I can see no balls bouncing !
    Below is the BallDemo class that has the bounce() method and the BouncingBall class that has the characteristics of a bouncing ball.
    There are no compilation errors which makes it a little bit
    difficult to find the error.
    Thank you in advance
    Stan
    import java.awt.*;
    //(d)
    import java.awt.Color;
    import java.util.Random;
    import java.awt.geom.*;
    //ex5.50 (a)
    import java.util.*;
    import java.io.*;
    * Class BallDemo - provides two short demonstrations showing how to use the
    * Canvas class.
    //(a) Change the bounce() method in the BallDemo class to let the user
    //choose how many balls should be bouncing
    //(b) Use a collection to store the balls
    //(c) Place the balls in a row along the top of the canvas.
    public class BallDemo
        private Canvas myCanvas;
        FormattedInput input;
         * Create a BallDemo object. Creates a fresh canvas and makes it visible.
        public BallDemo()
            myCanvas = new Canvas("Ball Demo", 600, 500);
            input = new FormattedInput();
            myCanvas.setVisible(true);
         * This method demonstrates some of the drawing operations that are
         * available on a Canvas object.
        public void drawDemo()
            myCanvas.setFont(new Font("helvetica", Font.BOLD, 14));
            myCanvas.setForegroundColor(Color.red);
            myCanvas.drawString("We can draw text, ...", 20, 50);
            myCanvas.wait(1000);
            myCanvas.setForegroundColor(Color.black);
            myCanvas.drawString("...draw lines...", 60, 70);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.blue);
            myCanvas.drawLine(200, 20, 300, 450);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.blue);
            myCanvas.drawLine(220, 100, 570, 260);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.green);
            myCanvas.drawLine(290, 10, 620, 220);
            myCanvas.wait(1000);
            myCanvas.setForegroundColor(Color.white);
            myCanvas.drawString("...and shapes!", 110, 90);
            myCanvas.setForegroundColor(Color.red);
                    // the shape to draw and move
            int xPos = 10;
            Rectangle rect = new Rectangle(xPos, 150, 30, 20);
            // move the rectangle across the screen
            for(int i = 0; i < 200; i ++) {
                myCanvas.fill(rect);
                myCanvas.wait(10);
                myCanvas.erase(rect);
                xPos++;
                rect.setLocation(xPos, 150);
            // at the end of the move, draw once more so that it remains visible
            myCanvas.fill(rect);
           //ex 5.48
           public void drawFrame()
             Dimension myDimension =new Dimension( myCanvas.getSize());
             //Rectangle rectangle = new Rectangle(10,10,myDimension.width,  myDimension.height);
             //page 136
            Rectangle rectangle = new Rectangle(10,10,580,480);
             myCanvas.fill(rectangle);
         * Simulates two bouncing balls
        public void bounce()
            int ground = 400;   // position of the ground line
            int numberOfBalls = 0;
            myCanvas.setVisible(true);
            ArrayList balls = new ArrayList();
            // draw the ground
            myCanvas.drawLine(50, ground, 550, ground);
            //ex 5.50 (a)
            System.out.println("Type in the number of balls you would like to see bouncing and hit enter");
              numberOfBalls = input.readInt();
             //(b)
             for(int i = 0; i < numberOfBalls; i++)
               //(c) (d)
            Random rg = new Random(255);
             BouncingBall newBall =  new BouncingBall(i + 100, 0, 16, new Color(rg.nextInt(255),rg.nextInt(255),rg.nextInt(255)), ground, myCanvas);
             //add the ball to the ArrayList object
            balls.add(newBall);
           for(int i = 0; i < numberOfBalls; i++)
                  BouncingBall ball = (BouncingBall)balls.get(i);
                  ball.draw();
              // make the balls bounce
              boolean finished =  false;
              while(!finished) {
               myCanvas.wait(50);           // small delay
               ball.move();
                // stop once ball has travelled a certain distance on x axis
                if(ball.getXPosition() >= 550 )
                    finished = true;
            }//move loop
                  ball.erase();
          }//for loop
        }//bounce method
    }//endof class
    ===================================================================
    import java.awt.*;
    import java.awt.geom.*;
    * Class BouncingBall - a graphical ball that observes the effect of gravity. The ball
    * has the ability to move. Details of movement are determined by the ball itself. It
    * will fall downwards, accelerating with time due to the effect of gravity, and bounce
    * upward again when hitting the ground.
    * This movement can be initiated by repeated calls to the "move" method.
    public class BouncingBall
        private static final int gravity = 3;  // effect of gravity
        private int ballDegradation = 2;
        private Ellipse2D.Double circle;
        private Color color;
        private int diameter;
        private int xPosition;
        private int yPosition;
        private final int groundPosition;      // y position of ground
        private Canvas canvas;
        private int ySpeed = 1;                // initial downward speed
         * Constructor for objects of class BouncingBall
         * @param xPos  the horizontal coordinate of the ball
         * @param yPos  the vertical coordinate of the ball
         * @param ballDiameter  the diameter (in pixels) of the ball
         * @param ballColor  the color of the ball
         * @param groundPos  the position of the ground (where the wall will bounce)
         * @param drawingCanvas  the canvas to draw this ball on
        public BouncingBall(int xPos, int yPos, int ballDiameter, Color ballColor,
                            int groundPos, Canvas drawingCanvas)
            xPosition = xPos;
            yPosition = yPos;
            color = ballColor;
            diameter = ballDiameter;
            groundPosition = groundPos;
            canvas = drawingCanvas;
         * Draw this ball at its current position onto the canvas.
        public void draw()
            canvas.setForegroundColor(color);
            canvas.fillCircle(xPosition, yPosition, diameter);
         * Erase this ball at its current position.
        public void erase()
            canvas.eraseCircle(xPosition, yPosition, diameter);
         * Move this ball according to its position and speed and redraw.
        public void move()
            // remove from canvas at the current position
            erase();
            // compute new position
            ySpeed += gravity;
            yPosition += ySpeed;
            xPosition +=2;
            // check if it has hit the ground
            if(yPosition >= (groundPosition - diameter) && ySpeed > 0) {
                yPosition = (int)(groundPosition - diameter);
                ySpeed = -ySpeed + ballDegradation;
            // draw again at new position
            draw();
         * return the horizontal position of this ball
        public int getXPosition()
            return xPosition;
         * return the vertical position of this ball
        public int getYPosition()
            return yPosition;
    }

    I'm not reading all of that. what do you see? here, try this out.
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.awt.geom.*;
    public class BallRoom extends Applet implements Runnable, MouseListener, ActionListener {
         Thread thread;
         Rectangle border;
         Ball[] theBalls;
         int numberOfBalls = 10;
         Image bufferedScreen;
         Graphics2D bufferedG;
         double xSpeed=3.0, ySpeed=0.0;
         double gravity=1.2;
         int bounds=600;
         int speed=50;
         Button fastBut=new Button("Faster"), slowBut=new Button("Slower");
         Panel controlPanel = new Panel();
         public void init() {
              fastBut.addActionListener(this);
              slowBut.addActionListener(this);
              controlPanel.setLayout(new GridLayout(1,2));
              controlPanel.add(fastBut);
              controlPanel.add(slowBut);
              this.add(controlPanel);
              addMouseListener(this);
              theBalls = new Ball[numberOfBalls];
              setSize(bounds,bounds);
              border = new Rectangle(0,0,getSize().width,getSize().height);
              setBackground(Color.white);
              for(int a=0;a<numberOfBalls;a++){
                   theBalls[a]=new Ball(Math.random()*bounds,Math.random()*bounds,Math.random()*40+5,new Color((int)(Math.random()*255),(int)(Math.random()*255),(int)(Math.random()*255)),border,gravity);
         public void start() {
              thread = new Thread(this);
              thread.start();
         public void run() {
              Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
              for(int a=0;a<numberOfBalls;a++){
                   theBalls[a].moveIt((int)(10-Math.random()*20),(int)(10-Math.random()*20));
              while(true){
                   for(int a=0;a<numberOfBalls;a++){
                        theBalls[a].moveIt();
                        for(int b=a+1;b<numberOfBalls;b++){
                             if(theBalls[a].intersects(theBalls)){
                                  swapSpeeds(theBalls[a],theBalls[b]);
                   repaint();
                   try{
                        thread.sleep(speed);
                   }catch(InterruptedException ex){
         public void swapSpeeds(Ball one, Ball two){
              double xVone=one.getxV();
              double yVone=one.getyV();
              double xVtwo=two.getxV();
              double yVtwo=two.getyV();
              one.setSpeeds(xVtwo,yVtwo);
              two.setSpeeds(xVone,yVone);
                   one.moveIt();
                   two.moveIt();
         public void paint(Graphics g) {
              g.setColor(Color.black);
              for(int a=0;a<numberOfBalls;a++){
                   theBalls[a].drawBall(g);
              Point2D.Double pointa=theBalls[0].getCenter();
              Point2D.Double pointb=theBalls[1].getCenter();
              double distance = pointa.distance(pointb);
              double deltaX = pointa.getX()-pointb.getX();
              double xSpot=theBalls[2].getX();
              double ySpot=theBalls[2].getY();
              g.drawString("X :"+String.valueOf(xSpot),20,20);
              g.drawString("Y :"+String.valueOf(ySpot),20,30);
              g.drawString("speed :"+String.valueOf(speed),20,40);
         public void update(Graphics g) {
              if(bufferedScreen==null){
                   bufferedScreen=createImage(getSize().width,getSize().height);
              bufferedG=(Graphics2D)(bufferedScreen.getGraphics());
              bufferedG.setColor(getBackground());
              bufferedG.fillRect(0,0,getSize().width,getSize().height);
              paint(bufferedG);
              g.drawImage(bufferedScreen,0,0,this);
    public void actionPerformed(ActionEvent e) {
              java.awt.Toolkit.getDefaultToolkit().beep();
              Button source = (Button)e.getSource();
              if(source==fastBut){
                   speed=speed-5;
                   if(speed<0){speed=0;}
              if(source==slowBut){
                   speed=speed+5;
         public void mousePressed(MouseEvent m){
              for (int a=0;a<numberOfBalls;a++){
                   if (theBalls[a].contains(m.getPoint())){
                        theBalls[a].setSpeeds( (5-(int)(Math.random()*10)),(int)(-40*(Math.random())) );
         public void mouseEntered(MouseEvent m){mousePressed(m);}
         public void mouseReleased(MouseEvent m){mousePressed(m);}
         public void mouseClicked(MouseEvent m){}
         public void mouseExited(MouseEvent m){}
    and this..
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    public class Ball extends Rectangle2D.Double {
         double a;                              //acceleration
         double yV=0, yVi=0, xV=0, xVi=0;     //velocity and initial velocity
         double t=1;                                       //time
         double roomWidth, roomHeight;
         double x_pos, y_pos;
         double ballDiam;
         double spring=.9;
         Rectangle room;
         Color color;
         Point2D.Double center;
         Ball(double x, double y, double diameter, Color color, Rectangle walls, double gravity) {
              a=gravity;
              room=walls;
              roomWidth=room.getSize().width;
              roomHeight=room.getSize().height;
              ballDiam=diameter;
              x_pos=x;
              y_pos=y;
              setRect(x,y,ballDiam,ballDiam);
              this.color=color;
              center = new Point2D.Double(x,y);
         public void moveIt() {
              setRect(xMove(),yMove(),ballDiam,ballDiam);
         public void moveIt(double x, double y) {
              setRect(xMove(x),yMove(y),ballDiam,ballDiam);
         public double xMove(double currentSpeed) {
              x_pos=getX();
              xV=currentSpeed;
              x_pos=x_pos+xV*t;
              return x_pos;
         public double xMove() {
              x_pos=getX();
              x_pos=x_pos+xV*t;
              if((x_pos<0) & ( xV<0  ) | ((x_pos>(roomWidth-ballDiam)) & ( xV>0  ))){
                   xV*= (-spring);
              return x_pos;
         public double yMove(double currentSpeed) {
              y_pos=getY();
              yVi=currentSpeed;
              yV=yVi+a*t;
              y_pos=y_pos+yV*t+.5*a*t*t;
              return y_pos;
         public double yMove() {
              double grav=a;
              if((y_pos>(roomHeight-(ballDiam+1)))|(y_pos<0)){ //negates gravity during impact
                   a=0;
                   if (y_pos<1 & y_pos>-.6){
                        yV=0;
              y_pos=getY();
              yVi=yV;
              yV=yVi+a*t;
              y_pos=y_pos+yV*t+.5*a*t*t;
              if((y_pos>(roomHeight-ballDiam)) & ( yV>0  )){
                   y_pos=roomHeight-ballDiam;
                   yV*= (-spring);
              if (y_pos<0 &  yV<0){
                   yV*= (-spring);
              a=grav;
              return y_pos;
         public void drawBall(Graphics g) {
              g.setColor(color);
              g.fillOval((int)getX(),(int)getY(),(int)ballDiam,(int)ballDiam);
              g.setColor(Color.black);
              g.drawOval((int)getX(),(int)getY(),(int)ballDiam,(int)ballDiam);
              g.drawString(String.valueOf(yV),(int)x_pos,(int)y_pos);
         public Point2D.Double getCenter(){
              center.setLocation(x_pos+.5*ballDiam,y_pos+.5*ballDiam);
              return center;
         public double getxV(){
              return xV;
         public double getyV() {
              return yV;
         public void setSpeeds(double x,double y){
              xV=x;
              yV=y;

  • Why aren't the VGA or DVI adapter included?

    How come one of the video adapters are not included when purchasing a MacBook Pro? I would think that the Mini DisplayPort to DVI Adapter would at least be included. In previous models of the MacBook Pro a Dual-Link DVI port was on the laptop and a DVI to VGA adapter was included in the box. Now we have to pay for an adapter that should be included? And why do we need a $99 adapter for Dual-Link DVI support? This should be built into the laptop as it was before.
    I just did a price compare between what our college purchased before and what will be purchased now.
    On September 18th, 2008:
    MacBook Pro 15-inch
    2.4 GHz Processor
    SuperDrive 8x
    200 GB SATA HDD @ 7200 RPM
    15-inch Glossy Widescreen Display
    Accessory Kit (that included the Manuals, AC Power Adapter, Display polishing cloth, the install discs, a DVI to VGA converter)
    4 GB 667 Mhz DDR2 SDRAM
    AppleCare Protection Plan
    $2,308.00
    However, today, October 16th, 2008, I respeced out the laptop;
    MacBook Pro 15-inch
    2.4 GHz Processor
    SuperDrive 8x
    250GB SATA HDD @ 7200 RPM
    15-inch Glossy Widescreen Display
    Accessory Kit (that included the Manuals, AC Power Adapter, Display polishing cloth, and the install discs)
    4 GB 1066 MHz DDR3 DSRAM
    AppleCare Protection Plan
    $2,318
    Okay, so the memory is faster, but the price difference between the 2GB of RAM and 4GB of RAM is only $135. However when looking at the price of memory (4GB for the 2.4 GHz MacBook Pro 15-inch) on Apple's site I get $300. Correct me if I'm wrong, but I think that's the same price it was before with the earlier models. So there shouldn't be any price adjustment for the memory. The drive was also increased to 250GB but being that this is now the smallest drive size (and with falling prices on drives) there shouldn't be a price difference with this either. We also loose the DVI to VGA converter ($17). So we are paying more for less.
    Because you now have to buy the converters for the new video connector the price gets even higher. $29 for either the Mini DisplayPort to DVI Adapter or Mini DisplayPort to VGA Adapter, or $99 for the Mini DisplayPort to Dual-Link DVI Adapter.
    Instead of hitting the customer with an al-la-carte of extra items to purchase, why doesn't apple continue to include a standard DVI port on the computer with the DVI to VGA adapter with the laptop?

    I agree. If Apple would like more people to use the MB and MBP in a business environment you MUST have an easy way to connect the machine to a projector! Nickleing and dimeing people to get an adapter is CRAZY Apple! You are selling even the base machine for at least $1200! The cable cost you MAYBE $1.50 to make... Come on, put one in the box! Don't make people buy one to make it work with a projector! Almost every other laptop in the world comes ready to drive a projector DIRECTLY!

  • Why aren't the install add-ons exceptions saving in the options - security panel?

    When I close Firefox 3.6.12, then re-open it, my add-on exceptions under options - security panel are not saving. It clears out all of the sites every time. Why?

    Make sure that you do not use [[Clear Recent History]] to clear the "Site Preferences"
    Clearing "Site Preferences" clears all cookies, images, pop-up windows, software installation, and password exceptions.

  • HT201317 Why aren't the photos I moved to the uploads folder showing up on my devices?

    Photostream is turned on and I copied some photos into the uploads folder on my PC but they are not showing up on my devices (iPhone, iPad).  Is there anything I can do to "push" the photos to them?  Thanks.

    i would suggest getting downloading a user manual on google for yourself.   if you are trying to view the email w/the picture attachment on your phone it may not always work. depening on the email provider. on my android i can view the sam picture w/the same size on my yahoo but not on my gamil. so if you are using the app you need to change the app setting on the email. i would suggest using the browser. once your in browser choose the menu button on your phoen and change to desktop mode. usually then you will get an option to view /download images attachments. .  if you go onto a computer to view the pictures you will have not problem. (shouldn't")   trying sending the pip in a picture message , but sent to your multiple email accounts
    have you tried sendin the message??? w/out the wifi.  thats not an error message its just a warning. your not goint to be charged any extra for sending a file. you have a data plan so that would be included. websited, just like facebook always have to disclose 'may be charger carried text/data rates' but if you have a plan there is no add'l cost.
    picasas sucks, you can access thru google plus app, picasa app, or internet/browser/crome and going to websit
    Dropbox is a backup application that you can use to back  up pix, music, documents, there must be the app arleady in your phone. if not download at the goolgle play store. they give you at least 2gb of backup space for free, might as well us
    in addin you can back all your pix up with verizon cloud / backup assistnace. that is already in you phone under settings - accounts. you may have the app as well. you can view whats back up on your vzw.com account

Maybe you are looking for

  • R-Series AMD support?

    The AMD Radeon HD 7770 graphics card that came with the system is going bad, so I thought rather than just replacing it with a new one I would upgrade to an R9 270X from XFX.  The 600W power supply that came on the PC can handle it, and the 2nd 6-pin

  • I need Java Classes to...

    Hi every one, I need a java class that takes a .class file (or set of files) and returns a list of all the classes that are used (referenced) by that class. Does anyone know of a Java class, or a Method or a package, or a tiny magical Gremlin that ca

  • Both iPod and iPad won't connect after update.

    Both iPod and iPad won't connect after update.  iTunes says "can't allocate a resource"

  • Unable to set up IMAP work email

    I've input the correct addresses, ports, encryption settings, etc and I can only get back: "the server is not responding" Very frustrated, as my previous 4 blackberries could all be set up simply by inputting my username and password. I really like m

  • Error in call transaction bdc

    hello, i'm prepare a bdc program for F-22,  when i record the process through shdb, an error occurs said a field must be filled( but the field is not on the current screen), and when a press enter a popup dialog said i can fill the field in the next