Even complicated and confusing topics will be easily developed and covered if you request our help writing an essay. Place an order today!

Goal: Build a simple app that uses two fragments to implement a gift card purchase

and redeem app.

Requirements:

1) You will have a main Activity

a. It will implement the interfaces PurchaseCallBack and

RedeemCallback.

b. It will have a container for a fragment that covers the bottom part of

the screen.

c. It will have two text views –

i. The first will display “# cards purchased worth ##.##”

ii. The second will display “# cards redeemed worth ##.##”

2) There will be a model GiftCardModel that will be a singleton.

a. It will have instance variables for Number of gift cards purchased,

Number of gift cards redeemed, the total purchased value, the total

redeemed value and a static inner class GiftCard that has two instance

variables amount and redeemed (Boolean). The model will maintain

an ArrayList that will record the status of all giftcards.

b. It will have the following methods.

c. purchaseCard(double amount) – will add a Gift Card to the list and

Display a toast message with code (position in the list) of the card and

the amount. Update the number purchased and total purchased.

d. Boolean redeemCard( int code) – will check to make sure that the code

is a legal position and if it is set redeemed to true. Display a toast

message with the code and indicate success or failure. If success, the

toast message should report that. If the redeem worked, update the

count and total.

3) It will have a PurchaseCardFragment that is a subclass of Fragment.

a. It will have a button to purchase a card.

b. It will have an EditText where you will be able to enter an amount.

Make sure it is of a number type.

c. It will have a button that will switch to the other fragment

(ToRedeem).

d. When purchase is pressed, the model will be updated and then an

update function will be invoked with the activity.

4) It will have a RedeemFragment that is a subclass of Fragment.

a. It will have a button to redeem a card.

b. It will have an EditText where you will be able to enter a code. Make

sure it is of a number type.

c. It will have a button that will switch to the other fragment

(toPurchase).

d. When redeem is pressed, the model will be updated and then an

appropriate update function will be invoked with the activity.

5) The PurchaseCallBack interface will have two methods.

a. Void update() – Will get the values from the model and set the text in

the main activities text views.

b. Void swapToRedeem() – change the two fragments so the

RedeemFragment is shown.

6) The RedeemCallBack interface will have two methods.

a. Void update() – Will get the values from the model and set the text in

the main activities text views.

b. Void swapToPurchase() – change the two fragments so the

PurchaseFragment is shown.

c.

7) The app should be tested properly and should not crash in any scenario.

a. Make sure on creation that you get a reference to your model and

update the display using the handy update CallBack function.

b. Make sure to only create the Fragments the first onCreate is called.

Sample Solution

The post Mobile Computing Android appeared first on nursing writers.

 

“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

The post Mobile Computing Android first appeared on nursing writers.

 

"Is this question part of your assignment? We Can Help!"

testimonials icon
PRyC WP: Add custom content to bottom of post/page: Standard Content START I need like 6-8 books to be...
testimonials icon
This answer must beat least300 words reference not included in word count. Needs at least 2 references thatare peer reviewed articles within the...
testimonials icon
for business math 2370 the questions are through connect mc graw hill. they are in folders but the total nu...
testimonials icon
Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input consists...
testimonials icon
1. Two common approximations for the number pi are and 3.141593. How would youdetermine which of these two approximations is greater? Give reason...
testimonials icon
Running head: THE ABILITY OF SEEING THE OTHERSThe Ability to see the Others[Author Name(s), First M. Last, Omit Titles and Degrees][Institutional Aff...
testimonials icon
Order Grade A+ Academic Papers Instantly!...
testimonials icon
Please watch the 4 minutes video of Wells Fargo (under Leaning modules week 4)and share your thoughts with your class. What is yo...
testimonials icon
Case: Prehistoric Computers is a company located in Anywhere, Arkansas that sells refurbished laptop computers to individuals and small businesse...
testimonials icon
Answers1. Perception2. Goals3. Channeling4. Face-to-face5. Briefer6. Top-down7. Two-Way Symmetrical Model8. Climax9. Credibility10. All of the aboveN...
testimonials icon
PERSONAL DEVELOPMENT ANALYSIS AND ACTION PLAN After reviewing and analyzing your progress made on your first Personal Development P...
testimonials icon
What are some distinctive advantages of a qualitative strategy for data gathering, such as participant observation, over mo...

Other samples, services and questions:

Calculate Price

When you use PaperHelp, you save one valuable — TIME

You can spend it for more important things than paper writing.

Approx. price
$65
Order a paper. Study better. Sleep tight. Calculate Price!
Created with Sketch.
Calculate Price
Approx. price
$65