C-CPP-Programming icon indicating copy to clipboard operation
C-CPP-Programming copied to clipboard

New feature in c++ project cgpa

Open dawitbeza opened this issue 1 year ago • 4 comments

I have contributed to the CGPA Calculator C++ project by addressing several issues and making improvements.

Firstly, I fixed a bug related to the use of variables for array initialization, such as int name[q]. This caused the program to fail, as array sizes must be constant expressions known at compile-time. To resolve this, I replaced these statically sized arrays with dynamically sized arrays using vectors.

Secondly, I refactored the code by replacing all goto statements with while loops. The use of goto is generally discouraged in modern programming due to its impact on readability and maintainability.

Finally, and most importantly, I added a new InputValidation function. This function ensures that user inputs are validated based on specified upper and lower bounds as well as the correct data type. The program will now continue prompting the user until a valid input is entered.

dawitbeza avatar Oct 18 '24 11:10 dawitbeza

Hello Dawit, the @The-Young-Programmer is about 1 year out of Github, but him gived me access to this repository, anyway i can't accept this pull request without his permission, so let's wait for his response. 🦖

P. S. your fix looks good by the way

Samuel-de-Oliveira avatar Oct 18 '24 13:10 Samuel-de-Oliveira

Thank you so much! I truly feel like a professional software engineer now, and I appreciate your help!

ghost avatar Oct 19 '24 17:10 ghost

@dawitbeza Can you implement this changes on my NEW Account https://github.com/The-Young-Programer/C-CPP-Programming

I have contributed to the CGPA Calculator C++ project by addressing several issues and making improvements.

Firstly, I fixed a bug related to the use of variables for array initialization, such as int name[q]. This caused the program to fail, as array sizes must be constant expressions known at compile-time. To resolve this, I replaced these statically sized arrays with dynamically sized arrays using vectors.

Secondly, I refactored the code by replacing all goto statements with while loops. The use of goto is generally discouraged in modern programming due to its impact on readability and maintainability.

Finally, and most importantly, I added a new InputValidation function. This function ensures that user inputs are validated based on specified upper and lower bounds as well as the correct data type. The program will now continue prompting the user until a valid input is entered.

@dawitbeza Can you implement this changes on my NEW Account https://github.com/The-Young-Programer/C-CPP-Programming

The-Young-Programer avatar Dec 29 '24 12:12 The-Young-Programer

Hello Dawit, the @The-Young-Programmer is about 1 year out of Github, but him gived me access to this repository, anyway i can't accept this pull request without his permission, so let's wait for his response. 🦖

P. S. your fix looks good by the way

@Samuel-de-Oliveira Thanks so much for standing by me This is my NEW Account https://github.com/The-Young-Programer/C-CPP-Programming

I forgot my two factor authentication in my old account 🥲

The-Young-Programer avatar Dec 29 '24 12:12 The-Young-Programer

/*

eeee88 avatar May 04 '25 12:05 eeee88