代做LCSCI4208 Fundamentals of Computer Science II Project 1 Coursework 2023-24代写留学生Java程序

- 首页 >> Matlab编程

Assessment Brief: Coursework 2023-24

Assessment Details

Course Title:

Fundamentals of Computer Science II

Course Code:

LCSCI4208

Level:

4

Assessment Title:

Project 1

Assessment Number:

AE2

Assessment Type:

Code & Documentation

Restrictions on Time/Length:

24-32h

Individual/Group:

Individual

Assessment Weighting:

40%

Issue Date:

13 February 2024

Hand in Deadline:

27 February 2024

Planned Feedback Deadline:

28 calendar days after hand in deadline

Mode of Submission:

Online (Gradescope)

Anonymous Marking:

Yes

Assessment Task

Have you ever been unable to send an image because it was too large to export? In this assignment you will be reducing the size of colour images stored in PNG format. You will be implementing an adaptation of a compression technique called seam carving.

You will write a program in Java that reduces the size of an image horizontally by removing columns of pixels.

First the image will be read into the program using the method fromFileImage. You can query the image to get the Color of a given pixel using the getColorAt(int x, inty) method.  Each  pixel  should  be  represented  by a class  Pixel containing all salient information about each pixel in the image.


Given any image, your program will allow the user to indicate whether to remove the bluest column, “b”, or a random column, “r”. The bluest column will use the metric of the sum of the blue value of the RGB value stored as a pixel’s colour.  The column to be removed will be highlighted by the program. If removing the bluest, the chosen column will be shown as blue on the image. If the column is selected at random, it should be highlighted in red. The user will then confirm that the column should be removed by typing “d” .

This program can be broken down into smaller tasks: (i) representing the imagefile with a data structure of your choosing; (ii) finding the bluest column; (iii) removing a column; and (iv) user interaction in the world program.

The program should allow the following key events:

“b” to remove the bluest column

“r” to remove a randomly selected column

“d” confirms the removal and shows the image without that column

“u” undo the mostrecent deletion

This program also requires you to construct new images, one pixel at a time.

Your  design  might  consider  the  use of a  ComputedPixelImage object. You  might consider methods such as setPixel(int x, int y, Color c) that allows you to set an individual pixel, and setPixels(int x, int y, int width, intheight, Color c) that allows you to fill an entire rectangle’s worth of pixels with a single colour.

Finally, as you construct various examples of images, you may want to save them as files. For this you can use the method saveImage(String filename), which will save the current image as a PNG file. You may want to use this to make test cases for yourself.

In summary, this project asks:

1.  Represent the PNG image using a data structure of your choosing

2.  Compressing horizontally by removing columns of pixels

3.  Columns at random: highlight in red

4.  Columns with the highest sum of Blue in the colour: highlight in blue

5.  Create a user interface that allows the user to select how deletion should happen (random or bluest). The program then highlights the column and removes it upon user confirmation. The interface allows the user to undo any number of deletions.


Specification

You must submit your work as a ZIP file to Gradescope. This file should:

●   Preserve the directory structure covered during the course (i.e., main, test, package)

●   The pom.xml with updated dependencies, where applicable.

●   Include all of the corresponding Java files that perform the tasks requested above, that is, not just the class containing the main method.

●   Comprise the image(s), in PNG format, involved in the project:

   The original image

○   At least 1 image resulting from applying the bluest row to the original image.

○   At least 1 image resulting from applying the random row to the original image.

●   All Java files should be commented on by you.

Assessment Criteria

70  or higher There was evidence of the ability to perform all programming tasks correctly. The demonstration of the methods was excellent, coherent, well documented and clearly explained.

60-69              There was evidence of ability to perform some programming tasks

correctly. The demonstration of the methods is good, coherent and reasonably detailed and explained.

50-59              There was evidence of ability to perform some programming tasks

correctly, but the demonstration of the methods was limited, incoherent, not adequately documented and vaguely explained.

40-49              There was  limited evidence of ability to perform programming tasks.

The demonstration of the methods involved significant omissions and produced substantial inaccuracies.

39 or less       Failure to solve the  programming task in assignment. Methods were

completely incorrect or absent. General grading criteria for Level 4 are described in Appendix B of the course syllabus.





站长地图