I did not do much programming before I decided to study IT. Still, I understand the basic rules of it, e.g. that in Java you always have to conclude a line with a ” ; “, or that you should make sure that there is some case that ends your loop before you test it. Anyways, I am one of the bloody newbies considering programming in the mass that is my fellow students (we’re about 690 – only counting those who START studying IT this autumn). So I decided to take part in an optional tutorial group for programming. First meeting was yesterday.
After 30 minutes, I was close to leaving, as I was not sure at all how I should solve the task. Today there will be a tutorial on Java basics, so I thought it might be better if I did that tutorial before cracking my head by trying to solve this exercise. But in the end, I got a working program. Not on my own, but that’s okay. I cooperated with another student who was struggling hard, too. And the tutor was ok with it, he only pointed out that the University would use a plagiarism-scanner on our submissions, so in any case we would have to re-write the code and make some changes.
This was the exercise:
Write a program that can scan a textfile containing an ASCII-picture. The program should finish after the last line and then state the lenght and broadth of the picture, length being the number of lines, broadth the number of symbols per line. If one line was too short, the program should stop and state “INPUT MISMATCH”.
Stating length and number of signs of something you put into the prompt was by far the easiest part. Boy, it took us some time to get the program to read the file.
But, step by step, we worked our way through the problems we encountered, and finally, after about 1.5 hrs, the program was finished 🙂
So the only thing I now have to do is get moving and make some changes to the code.
Yay!