User Story
As a developer
I want to implement the ExamAttempt entity and DAO layer
So that the application can track student exam attempts and scores
Description
Implement ExamAttempt POJO and DAO layer for managing student exam attempts.
Tasks
ExamAttempt Model (POJO)
ExamAttempt DAO Interface
ExamAttempt DAO Implementation
Testing
Acceptance Criteria
User Story
As a developer
I want to implement the ExamAttempt entity and DAO layer
So that the application can track student exam attempts and scores
Description
Implement ExamAttempt POJO and DAO layer for managing student exam attempts.
Tasks
ExamAttempt Model (POJO)
ExamAttempt.javainmodel/packageexam_attemptstable schematoString()for debuggingExamAttempt DAO Interface
ExamAttemptDAO.javainterface indao/packageExamAttempt DAO Implementation
ExamAttemptDAOImpl.javaindao/packagefindById(int id)findByExam(int examId)- all attempts for an examfindByUser(int userId)- user's attempt historyfindByUserAndExam(int userId, int examId)- specific user's attempts for examcountAttempts(int userId, int examId)- count attempts for validationcreate(ExamAttempt attempt)update(ExamAttempt attempt)- for updating score/statusTesting
findByUser()returns user's historyfindByUserAndExam()filters correctlycountAttempts()returns accurate countcreate()inserts with generated IDupdate()modifies score and statusAcceptance Criteria
ExamAttempt.javaincludes all fields from schemaExamAttemptDAOimplements all operationscountAttempts()works for max attempt validation