Question
Assignment 3: Multiscreen App SUBMISSION INSTRUCTIONS For this assignment to be accepted, you must submit the following files A zip file containing your Android project.
Assignment 3: Multiscreen App
SUBMISSION INSTRUCTIONS
For this assignment to be accepted, you must submit the following files
-
A zip file containing your Android project. The file must be a zip, not a rar or 7zip
-
A screenshot of Screen 1 and Screen 2 of your app, running in either an emulator or real device. Accepted image types: png, jpg/jpeg. If you are using an emulator, please demo your app on a Pixel 3 (or similar) emulator.
File Naming Conventions
-
Zip file should be named: a3-studentname-studentid.zip
-
Screenshot 1 should be named: a3-studentname-studentid-01.png
-
Screenshot 2 should be named: a3-studentname-studentid-02.png
MARKING RUBRIC
See assignment dropbox for actual marking rubric
-
Screen 1 validates user input: 4 marks
-
Screen 1 correctly populates spinners: 4 marks
-
Account Info class correctly created and data sent to screen 2: 4 marks
-
Screen 2 UI is populated correctly: 3 marks
-
Monthly payment is correctly calculated: 3 marks
-
Logout button segues back to screen 1: 2 marks
15% deduction will be applied to any submissions that have incorrect file naming.
ACADEMIC INTEGRITY
What is okay:
-
Using materials posted on the course website
-
Searching Google for syntax related to Android. Examples of acceptable searches include:
-
How to center an image in Android
-
How to change the font size in Android
-
Adding another screen to an Android app
-
What is not okay:
-
Sharing full or partial solutions with other learners
-
Using another persons solution as a reference/starting point for your solution
PROBLEM DESCRIPTION
Youve been hired by the local cell phone store to build an app to help customers buy a cell phone. Because phones are expensive, the cell phone store has allowed customers to pay for the phone over a 12-month period. The app allows them to create an account that displays their username, selected phone, and monthly payment amount on the phone.
Here is an example:
Screen 1 | Screen 2 |
|
|
DESCRIPTION OF APP FEATURES
SCREEN 1 - SELECTING A PHONE (10 marks)
On screen #1, the user:
-
Enters a username
-
Selects a phone model (iPhone 12 or Google Pixel 5)
-
Selects a color for the phone
-
Enters the amount of downpayment they want to make on the phone
1. Username:
The customer enters a username into the textbox. Before navigating to screen #2, the app must check that the customer has entered a unique username. If the username is already taken, display a error message and do not proceed to screen #2.
Here is a list of the current users in the system:
Existing Users |
thanos jonsnow wonderwoman peter abigail |
2. Phone Models, Prices and Colors
The phone model, phone colors should be displayed as separate
Here are the possible combinations of phones, colors, and prices:
Phone | Price | Colors |
iPhone 12 | 1199 | Black Red White |
Google Pixel 5 | 799 | Simply Black Sorta Sage |
The phone model
Selecting a different phone model should automatically update the choices in the colors
3. Downpayment
The downpayment textbox represents how much the person wants to pay towards the purchase of their phone.
You may assume that the user will always enter a number greater than or equal to 0.
4. Signup Button
When the user presses the Signup button, the app should check to see if the user has entered a unique username.
If no:
-
Display an error message
-
Blank out the username textbox (eg: delete any text that was entered in the username box)
-
Do NOT segue to screen #2 (keep the user on screen #1)
If yes, then send following information should be sent to Screen 2 as an AccountInfo object
-
Username
-
Phone model name (iPhone, Google Pixel 5)
-
Selected phone color
-
Price of phone (1199 or 799)
-
Downpayment amount
THE ACCOUNT INFO CLASS (5 marks)
The AccountInfo class represents a users account information at the time of signup. It is used to send data from screen 1 to screen 2.
The AccountInfo class has the following properties:
SCREEN #2 - YOUR ACCOUNT SCREEN
This screen displays a summary of the users phone purchase.
Specifically, show:
-
A welcome message with the username
-
The phone model and color the user selected
-
The price of the phone
-
The downpayment the user made
-
The amount of the users monthly payments
1. The monthly payment
The monthly payment is calculated as follows: (phone price - downpayment) / 12
If the users downpayment exceeds the price of the phone, then replace the monthly payments message with a message that says: The store owes you $______, where ____ is the excess amount the user paid.
All numbers must be rounded to 2 decimal points, using Javas String.format syntax.
-
Click here for example of rounding to 2 decimal points in Java
2. The logout button
Clicking on the logout button will automatically return the user back to Screen #1.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started