Portfolio Details
Discover the projects and case studies that showcase my expertise and passion for software development, highlighting my commitment to innovative solutions and effective problem-solving.
Project information
- Category: C#.net
- Client: Karlstad University
- Project date: 16 February, 2024
- Project URL: github.com
Lotto Simulation Program in C#.NET
This project is an introduction to graphical user interfaces (GUIs) in C#.NET, focusing on the basics of Windows Forms and foundational C# programming. The main objective of this lab was to create two programs, including a lotto simulation, using either UWP, WPF, or WinForms as the graphical library, implemented in .NET 6.0 or newer.
The lotto simulation program allows users to simulate a large number of lottery draws and calculate how many times they achieve exactly 5, 6, or 7 correct numbers out of 7 chosen numbers. Users can specify the number of draws, and the program will generate random lotto lines to compare against the user's chosen numbers.
Key features include ensuring that all inputted and generated lotto lines contain unique integers between 1 and 35, with no duplicate numbers and disregarding the order of numbers. The program also handles all errors with exceptions, providing user-friendly and descriptive error messages, while adhering to Microsoft's interface design recommendations.
The program is optimized to handle up to 999,999 draws efficiently, taking no more than approximately 2 minutes on a standard computer. It ensures that only valid lotto lines and draw counts are processed, maintaining both performance and accuracy in the simulation.