I'm working on creating an SRM CGPA Calculator app using C# and I need help with calculating CGPA based on the grades and credits of each subject. How can I effectively design a C# program that takes the grades and credits as input from the user, calculates the weighted average, and then outputs the final CGPA? Also, how should I handle edge cases like invalid input or zero credit hours for a subject? Any tips on UI/UX design for a user-friendly experience would be greatly appreciated!