Pt1420 Unit 8 Quiz

Improved Essays
Question #A.1
What is the first file your group looks at and why? What are the first (and most important) things that your group takes notice of in the code in this file? Answer #A.1
The first file we look at is the Image file because that is where all the methods are being compiled to get the out for the main method in
TestImage. We take notice of the different methods and constructors being created in the class such as Throws exception and BufferedImage.
Question #A.2
What happens in the constructor?
Answer #A.2
The constructor is supposed to throw an exception with a String type called filename. Question #A.3
Find the read method (note that the read method is not complete). How many parameters does the read method take and what are their
…show more content…
Question #D.3 + coding
You want to make a new Image object using the Image class that you finished. What type of parameter does your Image class constructor require? Inside of the try-block, create a new Image object using the animals image provided. \ Make sure that the animals.jpg file,
…show more content…
Then, call the draw method on the Image object that you just created and pass in the Graphics object, 10 for the parameter x, and 40 for the parameter y. Compile and run the TestImage class.
Answer #D.3
For creating a new Image using the Image class already created, the new
Image will require a file parameter of animals.jpg since that is the name of the file we are going to be using. Knowing the exact file being used will present this image when compiling the code.
Part E: Manipulating the image
After all that work trying to understand the other programmer’s code, you are ready to write your own code to manipulate the image.
Question #E.1 + coding
The first method that your boss wants you to create in the Image class is named flipY. This method should take the image and flip it around the yaxis.
Think of this as what you would see if you looked at the image in a mirror. Everything would be reversed horizontally, but not vertically (i.e. not upside-down). Should your method take any parameters? Why or why not? Should your method return anything? Why or why not? Create the code for this method and then compile. Then, call your method on

Related Documents

  • Improved Essays

    Blood Stained Tee Shirt Collection of item: I would wear disposable latex gloves to packaged the blood stained tee shirt into a plastic or airtight container. I would store it in a cool location until it was delivered to the laboratory. Processing of item: 2. Handprint on car Collection of item: I would apply powder to the location of the handprint and then I would lift it with a broad piece of adhesive tape.…

    • 746 Words
    • 3 Pages
    Improved Essays
  • Improved Essays

    Pt1420 Unit 3 Assignment

    • 533 Words
    • 3 Pages

    Final Project For my game I am going to make 2048. The user will use the arrows keys to control the movement of the number tiles across the board. The goal of the game is for the user to create the number tile with the value of 2048. The game has servel mechanics at play. First I will have to code a tile generator that creates a two or four numbered tile in a position around the perimeter of the board.…

    • 533 Words
    • 3 Pages
    Improved Essays
  • Decent Essays

    1. The question provides us those following weather information of one specific place: Maximum Temperature, Minimum Temperature, Average Temperature, Dew Point, Sunrise, Sunset, and Pressure. The date has been recorded daily for six months from April 1st, 2015 to September 30th, 2015. 2.…

    • 402 Words
    • 2 Pages
    Decent Essays
  • Improved Essays

    Pt1420 Unit 1 Assignment

    • 970 Words
    • 4 Pages

    Rounding Data When data is gathered and calculated, the final information presented tends to be rounded. On some occasions it may be necessary to round data, especially when rounding non-integer vales to integer values for simplicity and statistical representation. An example of this would be at the end of the calculations in sample weighting, the fractions you get are rounded to integers, since the data is based on physical objects which cannot have fractions, and so is considered extra for rounding purposes. Data may also me rounded in order for it to be understandable if the information is to be presented to other people, or just to keep important digits only to get an idea of scale. Extreme examples of this would be comparing the size of…

    • 970 Words
    • 4 Pages
    Improved Essays
  • Decent Essays

    Pt1420 Unit 6 Paper

    • 651 Words
    • 3 Pages

    1. What is the average debt for individuals 22-29? The average individual 22-29 years of age has 16,120$ dollars in debt. This is typically due to careless spending, because they are young and have no idea how to spend their money wisely.…

    • 651 Words
    • 3 Pages
    Decent Essays
  • Improved Essays

    Elisha, for the month of April you scored 7.6 points per hour. Your current yearly average is 7.3 points per hour. The team average for the month of April was 9.2 points per hour and the department average for the same month was 9.2 points per hour. Elisha, you continue to perform well below the department expectations in productivity month-over-month. As stated before this cannot continue.…

    • 407 Words
    • 2 Pages
    Improved Essays
  • Decent Essays

    Paragraph 3 - Identical twins are different in so many ways. Take for example the Bonnie and Brenda twins, they are identical twins, but different in so many ways. They were born as identical twins, and one became transgender. Another set of twins Anais and Sam they were raised from different parents, and raised in different countries. One of them was an actress and the other was a fashion designer.…

    • 201 Words
    • 1 Pages
    Decent Essays
  • Improved Essays

    Pt1420 Unit 3 Analysis

    • 485 Words
    • 2 Pages

    Unit 3 Discussion In mathematics, squaring a number is basically multiplying it by itself. It is simply impossible for two different numbers, when squared, to give the same results, because all positive real numbers have two square roots; a positive and a negative. For instance, in the following problem,(x^2=4) although it may seem as (x = 2) is the only solution, that is not true. If you solve using the Square Root Property, you can conclude that there are two solutions; (x = 2 or x = -2).…

    • 485 Words
    • 2 Pages
    Improved Essays
  • Improved Essays

    Pt1420 Unit 6 Assignment

    • 798 Words
    • 4 Pages

    Megan Douglas Lesson Title: All Aboard! Date: March 5, 2015 Essential Question: Does a pattern exist when finding the different combinations of cars used to create different train lengths using Cuisinaire Rods? If so, what is it and how do you find it? Lesson Rational: In this lesson, the students will use Cuisinaire Rods to create different combinations while having different “car lengths” (individual rods) add up to “trains” (combinations) which are equal to the length of a larger car.…

    • 798 Words
    • 4 Pages
    Improved Essays
  • Superior Essays

    Pt1420 Unit 3 Assignment

    • 3537 Words
    • 15 Pages

    There exists a game. A game older than time itself. This game is responsible for the genesis of every universe. Once a universe has reached maturity, the game will present itself to members of the species that it deems to be the most sentient and intelligent in that particular universe. Once the game presents itself to them, they will play the game.…

    • 3537 Words
    • 15 Pages
    Superior Essays
  • Decent Essays

    Pt1420 Unit 2 Homework

    • 524 Words
    • 3 Pages

    For this week, I was required to read chapter 2 in the "Think Python" textbook. This week's reading was a little more complicated and advanced than the first chapter. This chapter was not about writing phrases, but more about using variables to answer equations, and how to plug them into Python. The Written Assignment that was assigned, was based on what I learned in chapter 2. I was able to use the Pythagorean theorem to answer the question, by declaring the variable of each side, and plugging it in the formula to find the answer.…

    • 524 Words
    • 3 Pages
    Decent Essays
  • Improved Essays

    Nt1330 Unit 3 Quiz

    • 507 Words
    • 3 Pages

    1. Go to your home directory and run: Most file systems have designated directories to assign permissions or access rights to specific users. File permission controls users to view, change, navigate & execute the designated contents of the file directories. LINUX/UNIX coherently use file permission to enable access to ownership for files & directories. File permission includes rwx is for read, write, and execute permissions.…

    • 507 Words
    • 3 Pages
    Improved Essays
  • Improved Essays

    Martin Luther Dbq

    • 383 Words
    • 2 Pages

    Answer C is correct because on page 42 of our…

    • 383 Words
    • 2 Pages
    Improved Essays
  • Improved Essays

    Unit Eight Assignment PS365 My professional and educational journey began with my United States Army military service. I enlisted as a field medic. Once I had left the service I was placed on the IRR, and reactivated for Operation Desert Storm. When I got out again, I returned to civilian life and went to college at Angelo State University.…

    • 1099 Words
    • 5 Pages
    Improved Essays
  • Improved Essays

    Is conflict necessary for change? Based on Alexander Hamilton and Thomas Jefferson I draw the conclusion that yes, conflict is necessary for change. I believe that change is only completed if there is a conflict, no matter how big or how small it is. My three reasons for this, are based on Alexander Hamilton and Thomas Jefferson arguments on their views of human nature, the best form of government, and Ideal Economy. In documents provided for us, document 1, 2 Hamilton and Jefferson disagreed in the way they viewed human nature.…

    • 548 Words
    • 3 Pages
    Improved Essays