You are on page 1of 1

Department of Computer Science & Information Technology

University of Azad Jammu & Kashmir


Terminal Paper (Open book)

Class: MCS-IV Time: 8Hrs

Subject: Computer Graphics Marks: 75

Note: Write down your Name, Roll number, Course title and session on the top of your answer sheet.
You are supposed to solve your paper and then upload/return back the soft copy in PDF form of your
solved paper within given time. The papers received/uploaded after the time duration will not be
considered for marking. Hard copy of your solved paper must be reached to undersigned within two
days.

Keeping in mind the basic concepts of computer graphics, primitive graphics objects, rendering
process, RGB Model, Window-based programming and event handling techniques, provide the
solutions of the following problems using Java program segments.

Q No.1. Write a program segment to draw a triangle using three lines through mouse such that
you drag mouse from point P1 to P2 to make one side then from P2 to P3 for 2nd side and from P3
to P1 for 3rd side. (20)

Q No.2. Write a program segment to draw a square on the container by using scroll bar such that
square drawn can be resized by scroll bar. (15)

Q No.3. Provide a solution to design a window with menu bar having menus File and Edit. There
should be menu items like New and Close on File and Find on Edit to select a given text from the
text area on the frame providing suitable event handling code. (20)

Q No.4. Design the Flag of AJ&K with all color combinations. (20)

You might also like