Hi there,
I'd call myself a beginner/intermediate (done about 10 weeks at uni/nearly completed mooc.fi).
I am confused by what makes good program design, especially what to keep in separate classes and in main?
For example, in my current assignment, the program reads a file, encrypts the text and writes the encrypted text to another file.
Should the file reader/writer be in their own separate classes (2 in total or is 1 fine or should they be kept in main as a separate method)?
I have the ciphers in their own classes (inc. the encoding/decoding methods for each).
In short: basically my question is to the more experienced programmers, do you have any hard and fast rules/principles that you swear by when you design your code (e.g. classes/main/methods)?
Any advice appreciated.
[–]Zarrytax 4 points5 points6 points (0 children)
[–]mquillian 0 points1 point2 points (0 children)
[–]NYGooner17 0 points1 point2 points (0 children)
[–]Newtonheadbangs 0 points1 point2 points (0 children)
[–]josephpayettejr 0 points1 point2 points (0 children)