Preview

West

Satisfactory Essays
Open Document
Open Document
425 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
West
package je; import java.applet.Applet; import java.awt.Color; import java.awt.Graphics; public class je {

public static void main(String[] args) { // TODO Auto-generated method stub /* <APPLET CODE="Animation.JAVA" WIDTH=400 HEIGHT=300> */ //The basic applet class.The applet shows 4 cars crossing each other at a square. @SuppressWarnings("unused") class Animation extends Applet implements Runnable { //4 variables used to vary the car's positions. int x1=0,x2=380,y1=50,y2=250; public void start() { Object t = null; if(t==null) { t=new Thread(this,"New Thread");//New side Thread created on start of applet. ((Applet) t).start(); } } public void stop() { Object t = null; } //Implementation of method run() of Runnable interface. public void run() { Thread t1=Thread.currentThread(); Thread t = null; while(t==t1) { repaint(); try { Thread.sleep(100); } catch(Exception e) { } } } public void paint(Graphics g) { setBackground(Color.cyan); g.setColor(Color.BLACK); x1=(x1+16)%400; x2=x2-16; y1=(y1+12)%300; y2=y2-12; if(y2<0) y2=288; if(x2<0) x2=384; //Draw the roads using 2 filled rectangles using black color. g.fillRect(0,130,400,40); g.fillRect(180,0,40,305); //Draw the white colored lines. g.setColor(Color.white); for(int i=0;i<20;i++) { if(i!=9 && i!=10) g.drawLine(i*20,150,i*20+10,150); } for(int j=0;j<15;j++) { if(j!=7 && j!=8) g.drawLine(200,j*20,200,j*20+10); } //Draw 4 colored cars using filled round rectangles. g.setColor(Color.pink); g.fillRoundRect(x2,152,20,8,2,2); g.fillRoundRect(x1,140,20,8,2,2); g.fillRoundRect(190,y1,8,20,2,2);

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Spiralaterals with 2 numbers will make a rectangle or a parallelogram. Any set of numbers that is a repetition of one number (I.e. 1,1,1,1,1,1,1,1. 7,7,7,7,7,7,7. e.t.c) will also make rectangles. Also numbers that repeat two of the numbers but not the third one (I.e. 1,1,1,2,2,2,4. 3,3,3,3,3,1,5,5,5,5.)will make rectangles that will just go off and not return to their starting point.…

    • 307 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    PT1420 Unit 8 Lab 8

    • 365 Words
    • 2 Pages

    Step 6: Explain what you think will be displayed to the screen in Step 5. (Reference:…

    • 365 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    I used the eraser to remove any slightly shaded areas and around the darker line to create a cleaner line drawing.…

    • 1516 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    unit 7 assignment 1

    • 431 Words
    • 2 Pages

    7. Convert the While loop in the following code to a Do-While loop: int x;…

    • 431 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    westlane

    • 2707 Words
    • 11 Pages

    Shelby Givens, general manager of Westlake Bowling Lanes is concerned with whether the company is financially ready to pay back the debt owed to its board members. At this point the board may decide against any alternatives and chose to close down the business and liquidate its assets.…

    • 2707 Words
    • 11 Pages
    Powerful Essays
  • Satisfactory Essays

    Prg421 Week 2 Ia

    • 565 Words
    • 3 Pages

    JOptionPane; import javax.swing. JPanel; import javax.swing. JScrollPane; import javax.swing. JTextArea; import javax.swing. JTextField; import javax.swing.…

    • 565 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Westminister

    • 1070 Words
    • 5 Pages

    Carmax was the first successful company to sell used cars effectively and efficiently. Other companies tried to do what Carmax does and failed. Carmax is a retail store that offers thousands of used cars at a low price. The customer service is great and the salesmen don’t haggle. Carmax has a 125 point system that each car goes through to ensure superior quality and there is a 30 day warranty on every car. You even have a five day money back guarantee. Carmax is so successful because their business is based on integrity in all the aspects of the business. Carmax is trying to change the way car buying should be. They have friendly salesmen that are trained well and able to answer questions easily. There are vast arrangements of cars on the lot that are in every price range. Carmax has payment plans set up so anyone has the ability to buy a car. Even if you don’t buy a car at Carmax you have the ability to sell your car to them, no matter the damage.…

    • 1070 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Great West Dbq

    • 976 Words
    • 4 Pages

    Just got this back with a favorable grade (98) and felt it may be nice to share. We actually had a while to do this, so it's generally much more polished than a timed essay would be, but with my procrastination and general unwillingness to edit there are still a few uncomfortable sentences and a rather hasty conclusion.…

    • 976 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Western Expansion Dbq

    • 1042 Words
    • 5 Pages

    Manifest Destiny was the belief that the United States of America had the destiny of expanding across North America from the Atlantic to the Pacific Ocean. This terms meaning has changed and been misused over the years. It was used as a justification for the Mexican War, and eventually was led to believe that it was to expand slavery. The main purpose of Manifest Destiny was not to expand the institution of slavery but of expanding economy, expanding territories, and mostly nationalism. The expansion of slavery was a mere consequence of the otherwise successful Manifest Destiny.…

    • 1042 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Western Expansion

    • 837 Words
    • 4 Pages

    From the 1860s to 1900s, the United States expanded westward as miners, cattlemen, and homesteaders pushed into the trans-Mississippi West. Motivation for the expansion west had great impact on the United States. American settlers and business were attracted to western expansion as opportunity came up. Cattlemen, miners, and railroads had all greatly impacted the United States, but of the groups railroads held the most significant impact on the United States and the growth of the nation.…

    • 837 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    Western Expansion

    • 1473 Words
    • 6 Pages

    In 1803, President Thomas Jefferson purchased the territory of Louisiana from the French government for $15 million. The Louisiana Purchase stretched from the Mississippi River to the Rocky Mountains and from Canada to New Orleans, and it doubled the size of the United States. To Jefferson, westward expansion was the key to the nation’s health: He believed that a republic depended on an independent, virtuous citizenry for its survival, and that independence and virtue went hand in hand with land ownership, especially the ownership of small farms. (“Those who labor in the earth,” he wrote, “are the chosen people of God.”) In order to provide enough land to sustain this ideal population of virtuous yeomen, the United States would have to continue to expand.…

    • 1473 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    Who Came To The West

    • 651 Words
    • 3 Pages

    It is fascinating to learn how far the west has developed over the years. The west is huge over two million square miles that starts from the mississippi all the way to the pacific ocean. The west is such a beautiful place to see considering there was miles of grass and mountains. Something new I learned is that as everyone was arriving to the west, Americans were the last to arrive and they were also the ones who named it “The West”. Without there being myths I think it would have prolonged the discovery of the sea. It is not fair that mexican americans who originated in the west were slowly out numbered. Although, that was out of our control. It's amazing how some wouldn't plant anything into the ground because they didn't want to make any…

    • 651 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    American West

    • 1664 Words
    • 7 Pages

    The “American West” is not what many people think of when they hear those words. People think of it as cowboys and Indians fighting on the Great Plains and in the canyons or the travel across rugged terrain traveling as fast as they could for the gold rush. In all honesty the west started as soon as the Americas began to be colonized and many historians say it begins at the Proclamation Line of 1763. They had many struggles with the Native Americans, the French trying to take their land by way of war, and Great Britain, the motherland, taxing them harshly for war debt but the American colonists eventually made their way to what is today commonly called the West.…

    • 1664 Words
    • 7 Pages
    Powerful Essays
  • Satisfactory Essays

    The difference in tone is essential to create the shape. Furthermore, the thin lines in the background create a cobweb effect which show how the figure is stuck and is trapped in isolation.…

    • 305 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    The Decline of the West

    • 1118 Words
    • 5 Pages

    The capitalistic world was doing great, everyone was making money, and spending it like there was no tomorrow. Banks were lending people money to buy bigger houses, faster cars, and all other material things that an upper class family might need. Everything seemed perfect, until the financial world suddenly discovered that these methods weren’t sustainable and thus firing, and making no money available for lending anymore was needed. Mike, the main character of “The Decline of the West” is trapped in the middle of it all just as many real life bankers were in the grey financial era of 2007/2008.…

    • 1118 Words
    • 5 Pages
    Better Essays

Related Topics