0% found this document useful (0 votes)
13 views22 pages

Mobile Device Programming Lab 05

This document provides a comprehensive guide on the Model-View-Controller (MVC) architectural pattern in Android application development, detailing the roles of the Model, View, and Controller components. It covers implementation strategies, data flow, comparisons with other patterns, and emphasizes the importance of testing and real-world application. Additionally, it includes practical exercises for developing an Android app using MVC principles.

Uploaded by

dungnq222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views22 pages

Mobile Device Programming Lab 05

This document provides a comprehensive guide on the Model-View-Controller (MVC) architectural pattern in Android application development, detailing the roles of the Model, View, and Controller components. It covers implementation strategies, data flow, comparisons with other patterns, and emphasizes the importance of testing and real-world application. Additionally, it includes practical exercises for developing an Android app using MVC principles.

Uploaded by

dungnq222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN 71

PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

LEARNING OBJECTIVES

The learning objective is to understand the Model-View-Controller (MVC)


architectural pattern in Android application development.
Understanding MVC Concepts:
- Define the components of the MVC pattern: Model, View, and
Controller.
- Explain the responsibilities of each component in MVC.
Implementing Model Layer:
- Create data models to represent the application's data.
- Implement data access methods to interact with data sources (e.g.,
databases, web services).
Implementing View Layer:
- Design UI layouts using XML layout files.
- Create corresponding Java/Kotlin classes to handle UI logic and user
interactions.
Implementing Controller Layer:
- Create controllers or presenter classes to handle user input and manage
interactions between the Model and View.
- Update the View based on changes in the Model.
Understanding Data Flow:
- Describe how data flows between the Model, View, and Controller in an
MVC architecture.
- Explain how changes in the Model are reflected in the View through the
Controller.
Applying MVC in Android:
- Identify suitable scenarios for using the MVC pattern in Android
development.
- Implement MVC in Android projects to achieve separation of concerns
and maintainability.
Comparing MVC with Other Architectural Patterns:
72 PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

- Compare MVC with other architectural patterns commonly used in


Android development, such as MVVM (Model-View-ViewModel) and
MVP (Model-View-Presenter).
- Evaluate the advantages and disadvantages of using MVC in Android
compared to other patterns.
Testing MVC Components:
- Implement unit tests to verify the functionality of Model classes.
- Write UI tests to ensure the proper interaction between View and
Controller components.
Real-World Application:
- Apply MVC principles to develop a real-world Android application,
considering factors such as user experience, performance, and code
maintainability.
- Analyze existing Android applications to identify the use of MVC
architecture and its effectiveness.

OVERVIEW

The Model-View-Controller (MVC) architectural pattern in Android application


development is a method of organizing source code to separate different
components and responsibilities within the application.
Model: Represents the data and data processing logic of the application. It
often consists of object classes or data processing classes.
View: Represents the user interface (UI) part of the application. It usually
includes XML layout files and corresponding Java/Kotlin classes.
Controller: Acts as an intermediary between the Model and View. It receives
input from the user through the View, processes and directs data from the Model,
and updates the View based on new data.
MVC helps to separate the application logic into smaller, more manageable,
and reusable parts. However, in Android, architectural patterns like MVVM (Model-
View-ViewModel) and MVP (Model-View-Presenter) are often preferred due to
their better testing and maintenance capabilities.
PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN 73

TERMINOLOGY

Model: Represents the data and data processing logic of the application. It can
be object classes or data processing classes.
View: Represents the user interface (UI) of the application. It includes XML
layout files and corresponding Java/Kotlin classes.
Controller: Acts as an intermediary between the Model and View. It receives
input from the user through the View, processes and directs data from the Model,
and updates the View based on new data.
Data Binding: The process of automatically linking data between Model and
View, facilitating automatic UI updates when data changes.
Observer Pattern: A design pattern in which an object (Observer) observes and
automatically receives notifications about any changes of another object
(Observable).
UI Logic: Logic related to user interface, including displaying data, handling
user events, and updating the interface.

5.1. THEORETICAL SUMMARY


5.1.1. Knowledge
To learn the Model-View-Controller (MVC) pattern effectively, you need to
have a basic understanding of programming and software design concepts, as well
as a clear understanding of the specific components of the MVC pattern and how
they interact with each other. Here are some essential knowledge areas:
Basic Programming: Proficiency in Java or Kotlin (the primary programming
languages for Android).
Android Development Fundamentals: Understanding how to develop Android
applications, including creating user interfaces, handling events, and interacting
with databases.
Fundamental Software Design Concepts: Familiarity with software design
principles such as Separation of Concerns (SoC), Single Responsibility Principle (SRP),
and Dependency Injection.
MVC Pattern: Understanding the basic components of the MVC pattern
(Model, View, Controller) and how they interact with each other.
74 PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

Data Binding and Observer Pattern: Knowledge of applying Data Binding in


Android to link data between Model and View. Understanding the Observer Pattern
to automatically update the interface when data changes.
Practice and Real Projects: Working on real projects to apply knowledge and
practice practical skills in using the MVC pattern in Android app development.
5.1.2. Skill
To excel in implementing the MVC pattern successfully, you need the following
skills:
Programming Proficiency: Solid understanding of Java or Kotlin, the primary
languages used for Android development.
Android Fundamentals: Knowledge of Android app development basics,
including UI design, event handling, and data storage.
Software Design Principles: Understanding of software design principles like
SOLID principles, Separation of Concerns (SoC), and Dependency Injection.
Understanding of MVC Architecture: Familiarity with the Model-View-
Controller (MVC) architectural pattern and its components.
Data Binding and Observer Pattern: Knowledge of data binding to link data
between the Model and View, and understanding the Observer pattern for
automatic UI updates.
Testing Skills: Ability to write unit tests and UI tests to ensure the quality and
functionality of your app.
Version Control: Proficiency in using version control systems like Git to
manage and collaborate on code.
Problem-Solving Skills: Ability to analyze and solve problems efficiently, a
crucial skill in software development.

5.2. BASIC PRACTICE


5.2.1. Exercise 1
Developing an android application by applying a software architecture pattern
is always preferred by the developers. An architecture pattern gives modularity to
the project files and assures that all the codes get covered in Unit testing. It makes
the task easy for developers to maintain the software and to expand the features of
the application in the future. There are some architectures that are very popular
PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN 75

among developers and one of them is the Model—View—Controller(MVC) Pattern.


The MVC pattern suggests splitting the code into 3 components. While creating the
class/file of the application, the developer must categorize it into one of the
following three layers:
- Model: This component stores the application data. It has no
knowledge about the interface. The model is responsible for
handling the domain logic(real-world business rules) and
communication with the database and network layers.
- View: It is the UI (User Interface) layer that holds components that are
visible on the screen. Moreover, it provides the visualization of the data
stored in the Model and offers interaction to the user.
- Controller: This component establishes the relationship between the
View and the Model. It contains the core application logic and
gets informed of the user’s behavior and updates the Model as per
the need.

Please follow these steps:


Step 1: Create a New Project in Android Studio
Create new project with name : labfive. (Should choose Empty Activity, don’t
need to use other layout temmplates).
Step 2: UX/UI Design
Adding string resources ([Link])
76 PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

<resources>
<string name="app_name">Labfive</string>
<string name="question_text">Canberra is the capital of
Australia.</string>
<string name="true_button">True</string>
<string name="false_button">False</string>
<string name="correct_toast">Correct!</string>
<string name="incorrect_toast">Incorrect!</string>
</resources>

Next, design activity_main.xml layout


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="[Link]
xmlns:app="[Link]
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="24dp"
android:text="@string/question_text" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/true_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/true_button" />
<Button
android:id="@+id/false_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="@string/false_button" />
</LinearLayout>

</LinearLayout>

Match_parent view will be as big as its parent, wrap_content view will be as


big as its contents require
Step 3: Handling events
Next, adding member variables ([Link])
package [Link];
import [Link];
import [Link];
import [Link];
PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN 77

public class MainActivity extends AppCompatActivity {


private Button mTrueButton;
private Button mFalseButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
}
}

Next, getting references to widgets:


protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
mTrueButton = (Button) findViewById([Link].true_button);
mFalseButton = (Button) findViewById([Link].false_button);
}
}

Next, setting a listener for the TRUE button


mTrueButton = (Button) findViewById([Link].true_button);
[Link](new [Link]() {
@Override
public void onClick(View view) {
[Link]([Link], [Link].correct_toast,
Toast.LENGTH_SHORT).show();
}
});

Next, setting a listener for the FALSE button


mFalseButton = (Button)
findViewById([Link].false_button);
[Link](new
[Link]() {
@Override
public void onClick(View view) {
[Link]([Link],
[Link].incorrect_toast, Toast.LENGTH_SHORT).show();
}
});

Next, run app on Virtual device


Pulish your project to Github: Have github account and
Step by step:

Step 1: Choose Share Project On Github


78 PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

Step 2: Add accout

Click Generate Token


PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN 79

Click Add Account Click Share button

In the 'Add Files For Initial Commit' dialog, input the content for the commit
message, then click the 'Add' button and verify on your GitHub.

The result after uploading the source code to GitHub.


80 PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

Model-View-Controller
Creating the Question class

Adding to Question class


package [Link];

public class Question {


private int mTextResId;
private boolean mAnswerTrue;
public Question(int textResId, boolean answerTrue) {
mTextResId = textResId;
mAnswerTrue = answerTrue;
}
}

The Question class holds two pieces of data: the question text and the question
answer (true or false).

Generating getters and setters:


Open Android Studio’s preferences (from the Android Studio menu on Mac
and from File → Settings on Windows)
In the Naming table, select the Field row and add ‘m’ as the name prefix for
fields. Then add ‘s’ as the name prefix for static fields.
PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN 81

Right-click after the constructor and select Generate... and then Getter and
Setter. Select mTextResId and mAnswerTrue and click OK to create a getter and
setter for each variable

This result:
package [Link];

public class Question {


private int mTextResId;
private boolean mAnswerTrue;
public Question(int textResId, boolean answerTrue) {
mTextResId = textResId;
mAnswerTrue = answerTrue;
}
public int getTextResId() {
return mTextResId;
}
public void setTextResId(int textResId) {
mTextResId = textResId;
}
public boolean isAnswerTrue() {
return mAnswerTrue;
}
public void setAnswerTrue(boolean answerTrue) {
mAnswerTrue = answerTrue;
}
}
82 PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

Update your layout


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="[Link]
xmlns:app="[Link]
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">

<TextView
android:id="@+id/question_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="24dp"
android:text="@string/question_text" /> <!--remove this-->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/true_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/true_button" />
<Button
android:id="@+id/false_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="@string/false_button" />
</LinearLayout>
<Button
android:id="@+id/next_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/next_button" />
</LinearLayout>

Update strings ([Link])


<resources>
<string name="app_name">Labfive</string>
<string name="question_text">Canberra is the capital of
Australia.</string>
<string name="question_australia">Canberra is the capital of
Australia.</string>
<string name="true_button">True</string>
<string name="false_button">False</string>
<string name="next_button">Next</string>
<string name="correct_toast">Correct!</string>
<string name="incorrect_toast">Incorrect!</string>
</resources>
PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN 83

Adding question strings in advance ([Link])


<string name="question_australia">
Canberra is the capital of Australia.
</string>
<string name="question_oceans">
The Pacific Ocean is larger than the Atlantic Ocean.
</string>
<string name="question_mideast">
The Suez Canal connects the Red Sea and the Indian Ocean.
</string>
<string name="question_africa">
The source of the Nile River is in Egypt.
</string>
<string name="question_americas">
The Amazon River is the longest river in the Americas.
</string>
<string name="question_asia">
Lake Baikal is the world\'s oldest and deepest freshwater lake.
</string>

Notice that you use the escape sequence \' in the last value to get an
apostrophe in your string. You can use all the usual escape sequences in your string
resources, such as \n for a new line.
Adding variables and a Question array ([Link])
private Button mTrueButton;
private Button mFalseButton;
private Button mNextButton;
private TextView mQuestionTextView;
private Question[] mQuestionBank = new Question[] {
new Question([Link].question_australia, true),
new Question([Link].question_oceans, true),
new Question([Link].question_mideast, false),
new Question([Link].question_africa, false),
new Question([Link].question_americas, true),
new Question([Link].question_asia, true),
};
private int mCurrentIndex = 0;

Wiring up the TextView ([Link])


protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
mQuestionTextView = (TextView) findViewById([Link].question_text_view);
int question = mQuestionBank[mCurrentIndex].getTextResId();
[Link](question);
mTrueButton = (Button) findViewById([Link].true_button);
}

Run project. You should see the first question in the array appear in the
TextView.

Wiring up the new button ([Link])


84 PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

mNextButton = (Button) findViewById([Link].next_button);


[Link](new [Link]() {
@Override
public void onClick(View v) {
mCurrentIndex = (mCurrentIndex + 1) % [Link];
int question = mQuestionBank[mCurrentIndex].getTextResId();
[Link](question);
}
});

Encapsulating with updateQuestion()


@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
mQuestionTextView = (TextView) findViewById([Link].question_text_view);
//int question = mQuestionBank[mCurrentIndex].getTextResId();
//[Link](question);
. . .
mNextButton = (Button) findViewById([Link].next_button);
[Link](new [Link]() {
@Override
public void onClick(View v) {
mCurrentIndex = (mCurrentIndex + 1) % [Link];
//int question = mQuestionBank[mCurrentIndex].getTextResId();
//[Link](question);
updateQuestion();
}
});
updateQuestion();
}
private void updateQuestion() {
int question = mQuestionBank[mCurrentIndex].getTextResId();
[Link](question);
}

Run project and test your new NEXT button

Adding checkAnswer(boolean) ([Link])


private void updateQuestion() {
int question =0;
question = mQuestionBank[mCurrentIndex].getTextResId();
[Link](question);
}
private void checkAnswer(boolean userPressedTrue) {
boolean answerIsTrue = mQuestionBank[mCurrentIndex].isAnswerTrue();
int messageResId = 0;
if (userPressedTrue == answerIsTrue) {
messageResId = [Link].correct_toast;
} else {
messageResId = [Link].incorrect_toast;
PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN 85

}
[Link](this, messageResId, Toast.LENGTH_SHORT)
.show();
}

Calling checkAnswer(boolean)
[Link](new [Link]() {
@Override
public void onClick(View view) {
//[Link]([Link], [Link].correct_toast,
Toast.LENGTH_SHORT).show();
checkAnswer(true);
}
});
[Link](new [Link]() {
@Override
public void onClick(View view) {
//[Link]([Link], [Link].incorrect_toast,
Toast.LENGTH_SHORT).show();
checkAnswer(false);
}
});

Optional: You can add icon for Button


<Button
android:id="@+id/next_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/next_button"
android:drawableRight="@drawable/ic_launcher_foreground"
android:drawablePadding="4dp"/>

Run your project. You continue to refine the interface and


complete the product.
Commit code to Gihub: Ctrl+K or Command+K
5.2.2. Exercise 2
Expense Management App: Develop an app for personal or family expense
management, allowing users to input expenses, display statistical charts, and track
budgets. The requirements for the Expense Management app at a basic level:
1. Expense Management: The app allows users to input and manage personal
or family expenses in a simple way.
2. Enter Expenses: Users can add new expenses by entering basic information
such as expense name and amount.
86 PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

3. Display Expense List: The app displays a list of entered expenses, including
expense names and amounts.
4. Total Expenses: Show the total amount of expenses within a specific
period, such as day, week, or month.
5. Simple User Interface: Design a simple, user-friendly interface with clear
buttons and input fields.
6. Data Storage: Safely store entered expenses so users can access and
modify them as needed.
7. Basic Statistics: Provide basic statistical functions, such as total expense
amount per day, week, or month.
You can refer to the sample source code using the Model-View-Controller
(MVC) architecture in Java below:
MainActivity layout in XML
<?xml version="1.0" encoding="utf-8"?>
<[Link]
xmlns:android="[Link]
xmlns:app="[Link]
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<EditText
android:id="@+id/expenseNameEditText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="Expense Name"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/expenseAmountEditText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="Expense Amount"
PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN 87

app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/expenseNameEditText" />
<EditText
android:id="@+id/expenseDateEditText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="Expense Date"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/expenseAmountEditText" />
<Button
android:id="@+id/addButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Add"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/expenseDateEditText" />
<TextView
android:id="@+id/totalExpensesTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Total Expenses: $0.00"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/addButton" />
</[Link]>

Model ([Link]): This class represents the data model for an expense.

public class Expense {


private String name;
private double amount;
private String date;
88 PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

public Expense(String name, double amount, String date) {


[Link] = name;
[Link] = amount;
[Link] = date;
}
// Getters and setters
public String getName() {
return name;
}
public void setName(String name) {
[Link] = name;
}
public double getAmount() {
return amount;
}
public void setAmount(double amount) {
[Link] = amount;
}
public String getDate() {
return date;
}
public void setDate(String date) {
[Link] = date;
}
}
View ([Link]): This is the main activity of the app where users can
input expenses and view statistics.
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];

public class MainActivity extends AppCompatActivity {


private EditText expenseNameEditText;
private EditText expenseAmountEditText;
private EditText expenseDateEditText;
private Button addButton;
private TextView totalExpensesTextView;

@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN 89

setContentView([Link].activity_main);

expenseNameEditText =
findViewById([Link]);
expenseAmountEditText =
findViewById([Link]);
expenseDateEditText =
findViewById([Link]);
addButton = findViewById([Link]);
totalExpensesTextView =
findViewById([Link]);

[Link](view -> {
String name =
[Link]().toString();
double amount =
[Link]([Link]().toString()
);
String date =
[Link]().toString();

Expense expense = new Expense(name, amount,


date);
// Call controller to add expense to the model
[Link](expense);
});

// Display statistics
List<Expense> expenses =
[Link]();
double totalExpenses = 0;
for (Expense expense : expenses) {
totalExpenses += [Link]();
}
// Display total expenses in UI

[Link]([Link](totalExpenses));
// Display other statistics as needed
}
}
Controller ([Link]): This class handles the business logic,
interacts with the model, and updates the view accordingly.

import [Link];
90 PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

import [Link];

public class ExpenseController {

private static List<Expense> expenses = new ArrayList<>();

public static void addExpense(Expense expense) {

[Link](expense);

// Update view to reflect the changes

public static List<Expense> getAllExpenses() {

return expenses;

You complete the project and upload the source code to GitHub

5.3. APPLICATION EXERCISES


You practice additional topics to gain a better understanding of the MVC
pattern in Android.

1. The Health Management App aims to assist users in conveniently and


effectively tracking and managing their personal health status. The
Health Management App aims to assist users in conveniently and
effectively tracking and managing their personal health status. Below
are some key features of the app:

a. Health Information Recording: Users can record information


such as weight, height, heart rate, blood pressure, and other
health indicators.

b. Dietary Habit Tracking: The app allows users to record their daily
dietary habits, including meals, types of food, and quantities, to
monitor their nutritional intake.

c. Physical Activity Monitoring: Users can log daily physical


activities, including walking, running, gym workouts, and yoga
sessions.
PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN 91

d. Statistical Charts: The app displays charts and reports on users'


personal health, including changes in weight, BMI, and other
health indicators over time.

e. Reminders and Timers: It provides reminders and timers to


ensure users don't forget to record their daily health information
and perform physical activities.

f. Synchronization Feature: Supports data synchronization across


multiple devices so that users can access their health information
from anywhere.

2. The task management app is designed to help users organize and track
their tasks and assignments efficiently. Below are some key features of
the app:

a. Create and Manage Tasks: Users can create, edit, and delete
tasks, priorities, and projects based on priority and progress.

b. Planning and Scheduling: The app provides tools for planning and
managing work schedules, including time-based interfaces and
upcoming tasks.

c. Reminders and Timers: Reminder and timer features help users


not miss any tasks or deadlines.

d. Categorize and Group Tasks: Users can categorize and group


tasks into different categories or projects for easy management.

e. Sharing and Communication: Task sharing and communication


features among team members help enhance understanding and
collaboration.

REFERENCES

[1]. Android Developer. (n.d.). Guide Overview. Retrieved from


[Link]

[2]. Google. (n.d.). Android Architecture Components. Retrieved from


[Link]
92 PRACTICE EXERCISE 5: MODEL – VIEW – CONTROLLER PATTERN

[3]. TutorialsPoint. (n.d.). Android MVC Architecture. Retrieved from


[Link]

[4]. Vogella. (n.d.). Android Tutorial. Retrieved from


[Link]

[5]. Android Programming: Pushing the Limits by Erik Hellman: Hellman, E. (Year).
Android Programming: Pushing the Limits. Publisher.

You might also like