ScintillationGrid.java University of Delaware CISC 210
0 view 0 purchase
Course
CISC 210
Institution
CISC 210
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...
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 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
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
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
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.