How shaik-asif0/codtech-task2 works
Main Components
• User Interface (CLI): This is where the application interacts directly with the user. It collects input (student name, subjects, grades) and displays the results.
• Business Logic (Student Class): This core component contains methods to add grades, compute the average, derive letter grades, and calculate GPA.
• Control Flow (Main Function): Acts as the orchestrator by capturing user choices and triggering the appropriate methods on the Student object. In this basic design, it ties together the UI and the business logic.
• In-Memory Data Storage: Since the student’s grades are kept in a dictionary within the Student object, the data is maintained in memory throughout the application’s execution.
Relationships and Interactions
• The UI (CLI) receives inputs and directs them to the control flow (main function).
• The main function creates an instance of the Student class based on user input.
• The Student class methods (add_grade, calculate_average, etc.) process the data and return results that the UI then displays.
Architectural Patterns & Design Principles
• Separation of Concerns: Even though it’s in a single file, there is a conceptual separation between input/output (user interface via CLI) and business logic (Student class methods).
• Procedural Flow: The control flow is managed procedurally via the main function loop, directing flow between user actions and logic.
• Data Encapsulation: The Student class encapsulates all the data and related operations (grades, calculations).
Relevant Technologies, Frameworks, and Libraries
• Python is the sole technology here.
• Standard Input/Output for the CLI.
• No external libraries or frameworks are used, so the design is purely based on core Python functionalities.