C# Flashcard Project
by
Published on 08-03-10 05:00 AM
Number of Views: 9357
I've been working on this desktop program for about 3 months now. It's virtually ready; it can do everything it needs to, I am just adding some extra fluff, like help stuff.
The idea for the program came from studying Japanese in college, where I had originally written down all of my words on flashcards. This became cumbersome, as I had over 400 flashcards! I looked into alternatives such as websites that let you add flashcards, but not everywhere I went had Internet. So I looked into desktop applications for a flashcard program, and while there were some, I decided it would be fun to write my own!
|
In The Beginning...
...We start with a screenshot! As much as I want to bore you with text, I won't, so here's some eye candy (Right). When starting the project, I decided to take a real-world approach and write out the structure of my program before I started. So I came up with some requirements of what I wanted in the program and started writing them down:
- The ability to study only a portion of the cards at a time.
- The ability to sort those cards by however the user wants.
- The ability to see how the user performed on previous tests. (Chart?)
- To test by either reading comprehension or understanding (I.E. Converting JP text to romanji or the english definition.)
- To easily be able to add/remove cards to/from the library at any time.
- To be able to share your library of cards with friends if they use the program.
After I decided upon these requirements, I figured out exactly how my program needed to be structured to allow for this.
First, I wrote down exactly what I needed for my program to work:
- Flashcards,
- Groups (to sort the cards by),
- and Statistic Trackers.
Then I wrote down how the flow of my program would work:
|
|
Pictorial Representation:
|
Textual Representation:
|
|
- Main Screen -> Add/Remove Cards.
- Main Screen -> Add/Remove Groups.
- Main Screen -> Study Cards.
- Main Screen -> View Statistics.
- Add/Remove Cards -> Either view the library, add a card, edit a card, or remove a card.
- Add/Remove Groups -> Either view the groups, add a group, or remove a group.
- Study Cards -> Either continue studying, or stop studying.
- Study Cards -> At the end of the test, View Statistics.
- View Statistics -> View statistics and return to main window.
|
And then I started coding...
And So The Fun Begins!
I started off developing the FlashCardManager class.
Basically, this class holds all the FlashCards and Groups for my program. It does stuff like, making sure when I add a card, it isn't a duplicate, linking groups to cards (while also making sure I don't link duplicates), checking to see if cards exist in my library, among other things.
When I created this class in my program I decided to call it theLibrary. An example of the FlashCardManagers usefulness is seen in the screenshot on the right. After the user has selected the groups he/she wants to study, the program simply passes all the groups to the FlashCardManager and asks for it to return all the cards. This makes readability very easy.
The second thing I developed was the TestingStatistics class.
This class does the exact same thing as the FlashCardLibrary, except for test results. This class has much less functionality because it is used much less. It basically has the ability to get results for a certain card or test, add an answer for a certain test, and get all the results from the class to save them to a file. You don't see this class as much as you see the FlashCardManager.
But my crowning achievement, which probably isn't that amazing, is my UI (User Interface).
Using the Windows Presentation Foundation (WPF), I was able to quickly throw together an UI that looks stunning. Some things were quite tedious, but I managed to figure them out with the vast resources on the Internet.
I changed the theme of the window from that dull gray background to have some kind of Japanese garden behind each window, with the exception of the test window, which has an abstract blue background.
But enough about my code, let's see how the program works!
|
|
The Program
|
An example of how the program works:
- You choose which groups you want to study and the cards are retrieved.
- The cards are shuffled and you start the test.
- Your answers are logged so you can view them later.
- Depending on your settings, the answer will show if you miss the question, among other things.
- You complete the test and the statistics window pops up.
- You view the results of your test and close the window.
- You are now back at the main menu.
Simple eh?
|
When you're done taking a test and the statistics window pops up, you don't have to just view your test. You can view any of your previous tests and compare how well you did. You can also view your test results sorted by card, so you can see how well you have done in the past for a particular card.
This is basically the testing statistics window in a nutshell. It has the functionality it needs, however, I've been thinking of adding two things:
- The ability to view your results in a graph.
- The ability to create new groups that contain all the cards you have done poorly on.
I can see this being useful when trying to strengthen areas for an upcoming test in a class.
|
|
Conclusion
With my project steadily coming to an end, I find myself overflowing with ideas about what to build next.
A question many people ask me is, why do you make this stuff when teams of people have created something 10x better for free?
My answer is always the following, I wanted to do it for myself to teach myself a little more about coding!
I am extremely passionate about coding and will learn anything, given the time.
As for my next project?
Not too sure yet. I'm thinking about diving into the XNA Framework that Microsoft has provided and test the waters of game production- My ultimate goal!
Note: If you're wondering about my previous blogs, the "Photo Gallery Project", it is complete and I'm browsing around for a host to put my website on. Once it is live, I will make my last blog about it.
Note-2: If you want to try out my program, here's a link! Please report any bugs you find!
My Program From MediaFire
vBulletin Message