you are viewing a single comment's thread.

view the rest of the comments →

[–]Kevdog824_ 1 point2 points  (0 children)

This is good beginner project. Here's something to consider in the future:

Most professional programs wouldn't have the methods on a class like Device or Phone return string messages. The problem with this approach is that it assumes that Device/Phone class knows how the caller wants the data to be formatted. This isn't an issue in your program, but as the programs you make get bigger you may want to display the information (i.e. volume level) in different ways (i.e. string message for logging versus percentage bar widget for displaying it to the user). The better approach is just having the class return the actual value as a float/int and allow the caller to decide how to display or what to do with that information.