CS 1063 Introduction to Programming Lab 4

CS 1063 Introduction to Programming Lab 4 - &6...

Info icon This preview shows pages 1–3. Sign up to view the full content.

&6 ±²³´ /DE µ¶ +\SHUERODV DQG 6WDU :DUV 1DPHV 7KH Hyperbola DQG StarWarsNames &ODVVHV 2EMHFWLYHV &DOO PHWKRGV ZLWK SDUDPHWHUV DQG UHWXUQ YDOXHV± 8VH WKH 6WULQJ FODVV DQG 6WULQJ PHWKRGV± 8VH WKH 'UDZLQJ3DQHO DQG *UDSKLFV FODVVHV± +DQG·LQ 5HTXLUHPHQWV $OO SURMHFWV DQG ODERUDWRULHV ZLOO EH VXEPLWWHG HOHFWURQLFDOO\ WKURXJK %ODFNERDUG± =LS XS \RXU HQWLUH ODE GLUHFWRU\ WR VXEPLW DV WKH VRXUFH± ²5LJKW FOLFN RQ WKH ODE IROGHU DQG IROORZ 6HQG 7R ! &RPSUHVVHG ¸]LSSHG¹ )ROGHU RU º·=LS ! $GG WR »ODEµ¼]LS» ±³ 7KH ODE IROGHU VKRXOG LQFOXGH WKH IROORZLQJ´ Hyperbola.java StarWarsName.java DrawingPanel.java 1RWH WKDW RXWSXW ILOHV DUH QRW UHTXLUHG IRU WKLV DVVLJQPHQW± ,QWURGXFWLRQ 7KLV DVVLJQPHQW KDV WZR SDUWV´ +\SHUEROD 'UDZLQJ DQG 7KH 6WDU :DUV 1DPH *HQHUDWRU± )RU WKLV DVVLJQPHQWµ \RX ZLOO FUHDWH WZR .java ILOHV´ Hyperbola.java DQG StarWarsName.java ± 7KHVH WZR ILOHV SOXV DrawingPanel.java VKRXOG EH LQ \RXU lab4 IROGHU± 3DUW ,¶ +\SHUEROD 'UDZLQJ ,Q \RXU lab4 GLUHFWRU\µ FUHDWH D SURJUDP QDPHG Hyperbola.java 7KLV SURJUDP XVHV WKH *UDSKLFV REMHFW LQ D 'UDZLQJ3DQHO± ,Q RUGHU WR XVH WKH 'UDZLQJ3DQHO \RX PXVW GRZQORDG DrawingPanel.java ± 6DYH WKH DrawingPanel.java ILOH WR \RXU lab4 GLUHFWRU\± 0DNH D SURJUDP WKDW GUDZV WKH IROORZLQJ SLFWXUH ²FOLFN WR VHH IXOO VL]H³´
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

7R KHOS JHW \RX VWDUWHGµ WKH IROORZLQJ FRGH FUHDWHV D DrawingPanel REMHFW DQG WKHQ DFFHVVHV WKH Graphics REMHFW LQ RUGHU WR FDOO drawLine ± 7KH EHORZ RQO\ PDNHV WZR FDOOV WR drawLine µ ZKLFK SURGXFHV DQ ¶;¶ VKDSH± <RX ZLOO QHHG WR UHSODFH WKHVH FDOOV ZLWK RQH ORRS ²RU WZR³ WKDW FDQ SURGXFH WKH K\SHUEROD SLFWXUHV± import java.awt.*; public class Hyperbola { // The width and height of the DrawingPanel. public static final int PANEL_SIZE = 444; // Right now this draws an X, but should draw two hyperbolas.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '10
  • TIMMOTHYAPARKER

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern