Become a Site Supporter and Never see Ads again!

Author Topic: anybody know java?  (Read 9707 times)

0 Members and 1 Guest are viewing this topic.

Offline B

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1138
  • Gender: Male
anybody know java?
« on: October 23, 2003, 08:55:56 AM »
im sittin here in computer science class, workin on some program which does nothing and not doin too well on it...just wondering who else out there knows java, or c++, basic, html,  or whatever other programming languages there are

DaryanLenz

  • Guest
  • Trade Count: (0)
Re:anybody know java?
« Reply #1 on: October 23, 2003, 09:14:49 AM »
I know a bit of java...system, out void main..blah, blah.  I hated it, but I could maybe help with basic stuff.

Daryan

Offline Kevin

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1838
  • Gender: Male
    • Company Website (Learn to play by ear or by I.)
Re:anybody know java?
« Reply #2 on: October 23, 2003, 09:57:39 AM »
i pretty familiar and took the same class, i can try to help you out.  Whats the problem?
481(3)>722

Offline scb

  • Eli Manning should die of gonorrhea and rot in hell. Would you like a cookie, son?
  • Trade Count: (11)
  • Needs to get out more...
  • *****
  • Posts: 8677
  • Gender: Male
Re:anybody know java?
« Reply #3 on: October 23, 2003, 10:32:50 AM »
what's the assignment?


Offline B

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1138
  • Gender: Male
Re:anybody know java?
« Reply #4 on: October 23, 2003, 06:13:43 PM »
well, theres a website with the instructions on it, but you cant access it out of the baltimore county public schools network, so ill do the best to explain it.
we're supposed to be writing a program which prompts to the user and inputs the length and width for a rectangle - setting those as the variables for the dimensions.  then it prompts to the user and asks for a degree amount and dimensional decrease. it takes those variables and displays lots of other rectangles, which are stationary, rotated around a central point, getting smaller and smaller as they go along...i dont really expect any help, but thanks, guys

Offline Sean Gallemore

  • Trade Count: (2)
  • Needs to get out more...
  • *****
  • Posts: 8316
Re:anybody know java?
« Reply #5 on: October 24, 2003, 06:42:40 AM »
shit, I took C 2 quarters ago and forgot all that shit, sorry for the non-help, but I sympathize, +

Offline B

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1138
  • Gender: Male
Re:anybody know java?
« Reply #6 on: October 24, 2003, 07:45:28 AM »
its all good man

Offline B

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1138
  • Gender: Male
Re:anybody know java?
« Reply #7 on: October 24, 2003, 08:58:06 AM »
i doubt any of you could access this, but heres a link to the page

Offline MattD

  • Taper Emeritus
  • Trade Count: (1)
  • Needs to get out more...
  • *****
  • Posts: 4634
  • Gender: Male
Re:anybody know java?
« Reply #8 on: October 24, 2003, 04:38:38 PM »
The link would help :-p
Out of the game … for now?

Offline Sean Gallemore

  • Trade Count: (2)
  • Needs to get out more...
  • *****
  • Posts: 8316
Re:anybody know java?
« Reply #9 on: October 24, 2003, 07:13:51 PM »
lol, yes, link please, borf

Offline Nick in Edinboro

  • Wishes he was fishing right now...
  • Trade Count: (0)
  • Needs to get out more...
  • *****
  • Posts: 2924
  • Gender: Male
  • Toshiba SD3690 > HK AR-20 > B&K ST-140 > Axiom M22
    • moepics.com - share your shots of moe.
Re:anybody know java?
« Reply #10 on: October 25, 2003, 03:14:01 AM »
I'm fluent in C++ (OOP stylie), Assembly, COBOL, VB, ASP, JavaScript, SQL, XML, HTML, Perl, PHP, etc.. if yer still having problems drop a line and I'll do my best to help ya out in the morning tomorrow ;D
Oktava MC012's (dorseymod) > UA-5 (digmod) > JB3
http://braintuba.no-ip.com

Offline wbrisette

  • Trade Count: (2)
  • Needs to get out more...
  • *****
  • Posts: 2855
  • Gender: Male
    • Homepage
Re:anybody know java?
« Reply #11 on: October 25, 2003, 07:25:33 AM »
COBOL

Man, that's about as useful as my Fortran and Modula-2 stuff I took in college. ;-)

Wayne
Mics: Earthworks SR-77 (MP), QTC-1 (MP)

Editing: QSC RMX2450, MOTU 2408 MK3, Earthworks Sigma 6.2

Offline scb

  • Eli Manning should die of gonorrhea and rot in hell. Would you like a cookie, son?
  • Trade Count: (11)
  • Needs to get out more...
  • *****
  • Posts: 8677
  • Gender: Male
Re:anybody know java?
« Reply #12 on: October 25, 2003, 08:02:41 AM »
>>Man, that's about as useful as my Fortran and Modula-2 stuff I took in college. ;-)<<

this country's securities transactions rely HEAVILY on cobol.  it sucks, but wow, it's still WIDELY used
« Last Edit: October 26, 2003, 12:37:27 PM by scott brown »

Offline B

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1138
  • Gender: Male
Re:anybody know java?
« Reply #13 on: October 26, 2003, 12:30:04 PM »
whoops, sorry about that link stuff

Offline B

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1138
  • Gender: Male
Re:anybody know java?
« Reply #14 on: October 27, 2003, 08:51:07 AM »
i got it all under control - i figured it out and turned it in today...here it is if anybody wants to see it
import apcslib.*;

public class Rectangle2

{
   // variable declaration
   
   private double myX;
   private double myY;
   private double myWidth;
   private double myHeight;
   private static DrawingTool pen = new DrawingTool(new SketchPad(500, 500));
   private double myDirection;
   
   // constructors
   
   public Rectangle2()
   {
      pen.move(0,0);
   }
   public Rectangle2(double x, double y, double width, double height)
   {
      myX = x;
      myY = y;
      myWidth = width;
      myHeight = height;
   }
      
   // methods
   
   public double getPerimeter()
   {
      return (2 * myWidth) + (2 * myHeight);
   }
   public double getArea()
   {
      return (myWidth * myHeight);
   }
   public void setDirection(double direction)
   {
      myDirection = direction;
   }   
   public void setWidth(double w)
   {
      myWidth = w;
   }
   public double getDirection()
   {
      return myDirection;
   }
   public void setXPos(double x)
   {
      myX = x;
   }
   
   public void setYPos(double y)
   {
      myY = y;
   }
   
   public void draw()
   {
      pen.up();
      pen.move(myX,myY);
      pen.down();
      pen.setDirection(myDirection);
      pen.forward(myHeight);
      pen.turnLeft(90);
      pen.forward(myWidth);
      pen.turnLeft(90);
      pen.forward(myHeight);
      pen.turnLeft(90);
      pen.forward(myWidth);
   }
   
   public void drawString(String str, double x, double y)
   {
      pen.up();
      pen.move(x,y);
      pen.drawString(str);
   }   
   
   public double getX()
   {
      return myX;
   }
   
   public double getY()
   {
      return myY;
   }
   
   public double getWidth()
   {
      return myWidth;
   }
   
   public double getHeight()
   {
      return myHeight;
   }
}



import apcslib.*;

public class MethodsRect
{
   public static void main(String[] args)
   {
      Rectangle2 rect = new Rectangle2(-50,160,200,50);
      
      rect.setDirection(90);
      rect.draw();
      rect.drawString("Area = " + rect.getArea(),-225,175);
      rect.drawString("Perimeter = " + rect.getPerimeter(),-225,195);
      rect.drawString("Width = " +rect.getWidth(),-200,145);
      rect.drawString("Height = " +rect.getHeight(),-35,185);
      
      Rectangle2 rectA = new Rectangle2 (-10,0,200,50);
      
      double turnInc = 30;
      double widthDec = 10;
      
      rectA.setDirection(270);
      rectA.setDirection(rectA.getDirection());
      rectA.setWidth(rectA.getWidth());
      rectA.draw();
      rectA.setDirection(rectA.getDirection() - turnInc);
      rectA.setWidth(rectA.getWidth() - widthDec);
      rectA.draw();
      rectA.setDirection(rectA.getDirection() - turnInc);
      rectA.setWidth(rectA.getWidth() - widthDec);
      rectA.draw();
      rectA.setDirection(rectA.getDirection() - turnInc);
      rectA.setWidth(rectA.getWidth() - widthDec);
      rectA.draw();
      rectA.setDirection(rectA.getDirection() - turnInc);
      rectA.setWidth(rectA.getWidth() - widthDec);
      rectA.draw();
      rectA.setDirection(rectA.getDirection() - turnInc);
      rectA.setWidth(rectA.getWidth() - widthDec);
      rectA.draw();
      rectA.setDirection(rectA.getDirection() - turnInc);
      rectA.setWidth(rectA.getWidth() - widthDec);
      rectA.draw();
      rectA.setDirection(rectA.getDirection() - turnInc);
      rectA.setWidth(rectA.getWidth() - widthDec);
      rectA.draw();
      rectA.setDirection(rectA.getDirection() - turnInc);
      rectA.setWidth(rectA.getWidth() - widthDec);
      rectA.draw();
      rectA.setDirection(rectA.getDirection() - turnInc);
      rectA.setWidth(rectA.getWidth() - widthDec);
      rectA.draw();
      rectA.setDirection(rectA.getDirection() - turnInc);
      rectA.setWidth(rectA.getWidth() - widthDec);
      rectA.draw();
   }
}

 

RSS | Mobile
Page created in 0.067 seconds with 43 queries.
© 2002-2024 Taperssection.com
Powered by SMF