Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solution in Android Studio: Design and implement an android mobile application with description given below. Using SQLite to save data and read data in an

Solution in Android Studio:

Design and implement an android mobile application with description given below. Using SQLite to save data and read data in an MVC structure with the use of DialogFragment.

Application Description:

  1. Two Activities: mainActivity and assignmentActivity.
    • assignmentActivity is a child Activity to mainActivity (up navigation).
  1. mainActivity has:
          • A TextView that displays average of all the assignments stored in the database.
          • A ListView that displays all the courses stored in the database. For every course display the course title, code and average of the assignments for that course.
          • Every item in the list is clickable. When an item is clicked, go to assignmentsActivity.
          • Floating button that opens Insert Course DialogFragment.

3. Insert Course Dialog Fragment has:

      • 2 EditTexts for course title and course code.
      • 2 buttons for save course and cancel.
      • Save button: saves the input of the edit texts as a new course in the database then returns to main activity and reloads the listview.
      • Cancel button: closes the dialog and returns to main activity.

4. assignmentActivity has:

TextView that displays the title and code of the course being displayed (the one clicked from the listview in the previous activity).

  • ListView displaying the assignments and their grades for that course.

Floating button that opens Insert Assignment DialogFragment.

  • Delete button: deletes the course that is opened in the assignment activity then go back to the mainActivity and reloads the listview of the courses.

5. Insert Assignment DialogFragment has:

2 EditTexts for assignment title and grade.

2 buttons for save assignment and cancel.

Save button: saves the input of the edit texts as a new assignment to the course that was open. Then returns to the assignmentActivity and reloads the listview.

Cancel button: closes the dialog and returns to assignment activity.

Your database will have the following tables:

Course table:

CourseID primary key

CourseTitle

CourseCode

Assignment table:

AssignmentID primary key

CourseID

AssignmentTitle

Grade

To select all the assignment for one course, you need to select assignments where CourseID in table Assignment is equal to the CourseID from Course table.

To insert an assignment for a course, you need to insert the assignment to the Assignment table with CourseID the same as the CourseID of the course this assignment is assigned for in the Course Table

To delete a course, you need to delete all the assignments that has the same CourseID as the course you are deleting from the Assignment table and then delete the course from the Course table.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

5. Discuss the key roles for training professionals.

Answered: 1 week ago