I'm new to the object oriented process and want to develop this program in C#.
I have a textbox with the application's source path within it and a button to browse for another location.
Basically I browse to a location where I want to search for files with a .PLT extension. Whatever filenames are found they are then thrown into listbox1. I have another button that when pressed converts the prefix of the file to having a counter in front of the name (not the path) number 01_filename, 02_filename, 03_filename...etc. and that revised list is inserted into listbox2. Finally, I have a button that when pressed renames all the files in listbox1 to their adjusted counterpart in listbox2.
I could gather and write all this code in the click_events easily but I want to do this the true way...
What is the UML modeling I should have for the above and what should be my classnames, objects and properties? Methods are much easier to determine but what are my objects that I should begin with?
Much of the beginning books on object-oriented programming deal with a single object with its methods and properties. They mention examples like dog and properties like barking, color, etc. That has nothing to do with a business model.
What I'm doing has to do with multiple files (the total number of files could change based on various search results), then I'm throwing that it into Container1 and then a revised portion in Container2.
Do I start off making a File class/object or a Container class/object? What about renaming the files in Container1 and throwing that in Container2 - does that denote two objects or am I'm using the same Container object?
Could someone provide a sample class structure that would do some of the above? Again, this is not some coding project assigned to me by school - this is for my job. I already created a Microsoft Access program to do this using VBA. I just want to be able to program from now on in Visual C# and have an example that I can learn from to do object oriented programming.
Because the books sometimes are just ridiculous. I understand there may be a concern to explain all the concepts and terminology regarding what may be displayed. Don't worry, I have a lot of books to understand the definitions and instead I just want the class structure that fits my needs.
Start Free Trial