Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Task: News of your app dev skills have spread across the galaxy, and the United Federation of Planets is back for an update to their
Task: News of your app dev skills have spread across the galaxy, and the United Federation of Planets is back for an update to their software. They would like a mobile app to view the personnel assigned to each of their starships. Lets create an app with a few basic screens to get them started.
Instructions:
The app design will follow the MVC pattern as all of our mobile apps this semester There will be model classes, views, and controllers.
Begin by creating a new Android project in Android Studio, named according to the lab guidelines project name should be abclab where abc is your UTSA ID Set the minimum SDK of the project to API
Your application will read in data from files placed in the assets folder. Create a new assets folder in your project, and move the sample files into it
Add the following in the edu.utsa.csabclabmodel package:
All classes from Lab includes Starship, CrewMember, and Fleet
You can copy these over from your earlier lab, however be sure to review them for any mistakes, and copy the files do not link to them this creates a link on your local machine but does not export with your project. Use basic copy and paste to avoid this.
Your app should also contain:
MainActivity.java in the edu.utsa.csabclab package
StarshipActivity.java in the edu.utsa.csabclab package use the new activity wizard to create this activity
activitymain.xml in the res layout folder
activitystarship.xml in the res layout folder
Sample images Download Sample imagesOpen this document with ReadSpeaker docReader extract and place images in the res drawable folder
fleet.csv Download fleet.csv Open this document with ReadSpeaker docReader in the assets folder
personnel.csv Download personnel.csvOpen this document with ReadSpeaker docReader in the assets folder
Remember to ensure your app works on the same version of Android we are using in class, and in the emulator. Graders will use the same version to test your app.
App Design:
The View:
Your app will show a view similar to the one shown in the first image to the left below when the app is run in the emulator. This view displays a logo and at least buttons, each with the name and registry of a starship. This screen will be the activitymain.xml
When the user chooses one of the displayed buttons, the app will bring them to the second screen, activitystarship.xml An example is shown in the second image below. You may customize your app however you choose this includes fonts, images, colors, configuration. This app must have the described GUI components on each screen.
Any images shown in the samples below have been provided. If you choose to use them or you may optionally find your own images
AppViewpngAppViewpng
The Controller:
MainActivity.java will launch when the application is run, and show the activitymain.xml
MainActivity will have implementation for the View.OnClickListener interface using Anonymous Inner Classes to enable the buttons to listen to user clicks from the buttons on the GUI.
When the user clicks on a button for a starship, the StarshipActivity should call upon a model class to load the data from the given files in the assets folder and return the information for the requested Starship and CrewMembers. This information will be displayed on the second screen.
Controllers in your application should never read files or update data. Instead, to follow MVC the controller classes will call upon the model classes to complete these tasks.
The Model:
All model classes from the previous lab can be reused see that lab description for full descriptions of each class. You may add to these classes as needed to implement this lab, however be sure to retain their original implementations as well do not remove or modify basic components eg a Starship still has CrewMembers
Unlike the previous lab, we will not hardcode our data to create a Starship or CrewMember. Instead, this data is provided in fleet.csv and personnel.csv Load the data needed from these files note that we will only read from the files in this lab there will be no writing
The second screen displays information about the chosen Starship, so there should be a method in either Fleet or Starship to enable this, reading the data from the provided files The StarshipActivity class will call on this method. All personnel all crew members for a starship should be listed, along with their photo, titlerank name, and position.
All classes in the model must always have Javadoc comments, getters and setters for all class variables. Constructors are required for all required variables in a class.
If your model classes contains more information, that is fine, however if that extension interferes with the requirements of this lab, you may lose credit.
Notes:
The second screen displays information about the chosen Starship, so there should
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