Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

ScintillationGrid.java University of Delaware CISC 210

Rating
-
Sold
-
Pages
4
Grade
A+
Uploaded on
03-02-2023
Written in
2022/2023

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 program to print out various scintillation grids and a student designed drawing. * * email address: * 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

Show more Read less
Institution
Course

Content preview

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:
* 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/

Written for

Course

Document information

Uploaded on
February 3, 2023
Number of pages
4
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ExamsConnoisseur Self
Follow You need to be logged in order to follow users or courses
Sold
587
Member since
3 year
Number of followers
344
Documents
1492
Last sold
6 days ago

4.2

68 reviews

5
40
4
11
3
13
2
1
1
3

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions