100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
ScintillationGrid.java University of Delaware CISC 210 $7.99   Add to cart

Exam (elaborations)

ScintillationGrid.java University of Delaware CISC 210

 0 view  0 purchase
  • Course
  • Institution

import .Color; import .Font; // I imported this to change fonts, hope that's okay import .Graphics; /** * CS312 Assignment 3. * * On my honor, Michelle Shao, this programming assignment is my own work and I have * not shared my solution with any other student in the class. * * A pro...

[Show more]

Preview 1 out of 4  pages

  • February 3, 2023
  • 4
  • 2022/2023
  • Exam (elaborations)
  • Questions & answers
avatar-seller
import java.awt.Color;
import java.awt.Font; // I imported this to change fonts, hope that's okay
import java.awt.Graphics;

/**
* CS312 Assignment 3.
*
* On my honor, Michelle Shao, this programming assignment is my own work and I
have
* not shared my solution with any other student in the class.
*
* A program to print out various scintillation grids and a student designed
drawing.
*
* email address: mshao123@cs.utexas.edu
* UTEID: ms76365
* Unique 5 digit course ID: 51415
* Grader name: Carla
* Number of slip days used on this assignment: 0
*/

public class ScintillationGrid
{
// Main method that creates the DrawingPanel with scintillation grids.
// Restricted to chapters 1 - 3 of Building Java Programs
public static void main(String[] args)
{
/* In the final version of the program DO NOT call method drawingOne
from main or anywhere else in the program */

// Creates the DrawingPanel and changes the background
// color to cyan for the scintillation grids background.
DrawingPanel scintillation = new DrawingPanel(900, 650);
scintillation.setBackground(Color.CYAN);
Graphics g1 = scintillation.getGraphics();

// Method call for my own drawing:
// drawingOne();

// Draws the 4 scintillation grids
drawAll(g1, 0, 0, 348, 75, 3, 16);
drawAll(g1, 400, 50, 422, 50, 6, 12);
drawAll(g1, 50, 400, 220, 100, 1, 20);
drawAll(g1, 500, 500, 148, 15, 7, 4);
}

/*
* Draws the black background with x and y coordinates,
* and the width and height of the rectangle, which
* correlates to the size of the large square.
*/
public static void drawGrid(Graphics g1, int x, int y, int sizeLarge)
{
g1.setColor(Color.BLACK);
g1.fillRect(x, y, sizeLarge, sizeLarge);
}

/*
* Draws the vertical lines with parameters
* Graphics g1, x and y coordinates,
* sizeLarge size of the large square,
* sizeSmall size of the smaller squares,
* numLines for the number of vertical lines,
* and thickness of the lines.

This study source was downloaded by 100000858936669 from CourseHero.com on 02-02-2023 23:23:32 GMT -06:00


https://www.coursehero.com/file/25949396/ScintillationGridjava/

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller ExamsConnoisseur. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79650 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.99
  • (0)
  Add to cart