Sunteți pe pagina 1din 4

INF2010 - Data Structures and Algorithms

autumn 2019

Work Practice 1

Java

objectives

• Learn the basics of programming with Java

• Use polymorphism, aggregation and composition.

• Using design patterns.

• Complete TODOs.

I recommend taking the IDE Intellij, you can simply choose to open

a project with the file unzip the lab. Also, you may be going to have to choose

version of Java (SDK), it should be reflected in /opt/java/jdk8.x86_64 way. If the

version is not the right you can change it like this: File -> Project Structure

- > SDK -> (the green).

You will also probably need to configure an environment variable like this:

You click on the "play" green, this will you create a boot configuration and

debugging.
General problem

We will create the famous "Hello World", but graphically, without using

no specialized library. The goal is simple, write pixels on the screen in a

certain order. The end result should look like this:

Note that this is far from art, but we understand the principle! There you

recommends to understand the behavior uncorrected files too.


Part 1: Point

A point is a data structure representing a vector. We consider

usually in 2D and 3D version of it. It is very useful to change

easy points in space, we have to create some methods

as "rotate" and "translate". You'll have to edit the files:

• Point2D

• PointOperator

Part 2: Form

A form is simply a composition of several points, we will only

we focus on the two-dimensional shapes. A may have any shape (the

letter 'r'), as it can be predefined (a square). You'll have to change

files:

• BaseShape

• Rectangle

• Ellipse

Part 3: Letter

A letter is an aggregation of simple shapes to create a more complex shape.

We use the creative boss to generate a series of letter, not all for it

would be really tedious. You'll have to edit the files:

• LetterFactory
Rating Scale

Part 1 / 10

Part 2 /5

part 3 /4

Style /1

Total / 20

A style point is awarded. This is more negative correction if the code is difficult to read.

Autocorrect : We'll use the automatic fix to your code, although it allows to catch some errors, the
entirety of your code will be reviewed by a responsible laboratory. So there may be differences
between your lab results and that of the final correction. You can add more test cases if you want.

Instructions for submission


Please send only:

• Point2D

• PointOperator

• BaseShape

• Rectangle

• Ellipse

• LetterFactory

In a type * .zip archive to be known inf2010_lab1_MatriculeX_MatriculeY

(So ​that MatriculeX <MatriculeY). Late work will be penalized 20%

per day of delay. No work will be accepted after 4 days late.

WARNING! WARNING! WARNING! For those who want to file their

laboratory GitHub, make sure your directories are in fashion private to

prevent copying and unauthorized use of your work.

S-ar putea să vă placă și