Assignment 1 2017-2018

Last Update 01.12.2017:

Readme file should be a plain text file (so that it can be easily read on any operating system/environment).

In Java, if you use Scanner [0], you need to specify the correct charset for the second problem (“UTF-8” [1]):

new Scanner(new File(fileName), "UTF-8");

However, I suggest you use BufferReader instead. [2] (an explanation [3])

[0] https://docs.oracle.com/javase/9/docs/api/java/util/Scanner.html
[1] https://en.wikipedia.org/wiki/UTF-8
[2] https://docs.oracle.com/javase/9/docs/api/java/io/BufferedReader.html
[3] http://www.geeksforgeeks.org/difference-between-scanner-and-bufferreader-class-in-java/

========================================================================

 

The first assignment has been published here.

You are now able to upload the archive with your solution, for automatic judging on vmchecker. You can log in on it using your moodle accounts.

If you choose to implement in Java, the archive must contain:

  • Tunnel.java
  • FileDiff.java
  • Readme

Important! The java files must not have any package declaration in it. If it has, then remove it before uploading the archive. Otherwise, only if you want to use a different structure, you will need to provide a Makefile.

If you implement in C/C++, you need to provide a Makefile with at least these 3 rules:

  • build     – a rule to build the binary files
  • run-p1  – a rule that runs the binary for the first problem
  • run-p2  – a rule that runs the binary for the second problem

Makefile examples:

Sample tests for the two problems: sample_tests (these are some of the tests actually used for evaluating your solution)

Remember to describe in the Readme file the algorithm used in your solution, and its complexity.

Coding style suggestions.

The deadline for the assignment is 04.12.2017 23:59.

Any questions can be addressed as comments on this post.

 

A set of small sample tests for the FileDiff problem, that are easier to debug but require that you implement the minimum lexicographically condition correctly:  File Diff extra sample tests

2 Responses to Assignment 1 2017-2018

  1. Ana Georgia Turcus says:

    I uploaded the hw on vmchecker but I get an invalid output error even though the program works, it creates the output file tunnel.out. (I implemented in C++)

Leave a comment