Edinboro University

CSCI 374 Mobile App Development
Spring 2022

Resources You'll need:



Introduction to the course

  • Go over syllabus
  • What you'll learn
  • What you need
  • Assignments
  • Grading
  • Expectations
  • Lab time
  • Edinboro Network
  • Take roll

Chapter 1



Chapter 2


Chapter 3


  • Continue Chapter 3
  • Do some of the problems in the back of Chapter 3 as prep for the chapter 3 assignment.
  • Continue with later versions of Tic Tac Toe

Chapter 4



Chapter 4

  • Finish the Mortgage Calculator
  • Continue with Ch 4 Power Point Slides
  • In-class each work on a temperature conversion app.

Some notes on the sizes of thigs in android:

px > Pixels - corresponds to actual pixels on the screen.

in > Inches - based on the physical size of the screen. > 1 Inch = 2.54 centimeters

mm > Millimeters - based on the physical size of the screen.

pt > Points - 1/72 of an inch based on the physical size of the screen.

dp or dip > Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion. Note: The compiler accepts both "dip" and "dp", though "dp" is more consistent with "sp".

sp > Scaleable Pixels OR scale-independent pixels - this is like the dp unit, but it is also scaled by the user's font size preference. It is recommended you use this unit when specifying font sizes, so they will be adjusted for both the screen density and user's preference. Note, the Android documentation is inconsistent on what sp actually stands for, one doc says "scale-independent pixels", the other says "scaleable pixels".


Chapter 5

3/7 Spring Break
  • Talk about the database functions of the Candy Store
  • #21 Add a back button to the update activity

Chapter 6



Helpful hints for the Trivia game

  • Adding functionality to the database (vs. the candy store)
  • how to shuffle questions
  • how to shuffle answers
  • Keep track of number of right and wrong answers
  • Add more styles to the buttons
  • Add a launcher icon

Discuss the next assignment

Chapter 6: Managing Orientation


In-Class Exercise

Let's do #24 page 247 in class and possibly on Thursday. We'll take our old tip calculator and make it so it looks good horizontal also. Let's not worry about the number of guests options

Let's do the 2 XML file option. Here's my solution:

Verticle Tip Calc Horizontal Tip Calc


Chapter 7




Chapter 8

Chapter 9



Chapter 10

Chapter 11

Chapter 12


4/25 Catch up

Final Exam Period

Tuesday May 4th @ 10:15 am




Please put your Name at the end of your project name ex.) "Caloire_Counter_Dale_Jones"

Due Date Description



#11 and #12 Page 38.


Calorie Counter

#30 Page 85

Compare to https://caloriecontrol.org/healthy-weight-tool-kit/get-moving-calculator/

Calories Burned = (MET value) * (Weight in kg) * (Hours Spent)

Met Values:

  • Aerobics: 7.3
  • Bicycling: 7.5
  • Dancing: 5
  • Running: 9.8
  • Swimming: 6
  • Walking: 4.3

1kg = 2.2 lbs.

Calorie Counter Solution Calorie Counter Solution Calorie Counter Solution




Simple BlackJack

#30 Page 126

Remember with this assignment don't use XML to create your layout. Build this via Java code in your MainActivity.java

Note the "busted" below on the 3rd image when the player goes over 21.

Simple Blackjack 1 Simple Blackjack 2 Simple Blackjack 3




Currency Converter

#31 page 172 -

  • Use XML to design the screen if you want (vs. programatically as in the previous assignment).
  • You can take parts off of the Mortgage Calculator or the Temperature Converter we did in class
  • Look at examples below. I based this off of what we designed in class. This a total of 2 screens, the last 2 screen shots are of the same page.
  • Currency Converter ratios:
    • 0.93 Euro to a 1 dollar
    • 7.02 Yuan to 1 dollar
    • 0.78 pounds sterling to 1 dollar
    • 71.88 Rupees to one dollar
    • 112.07 Yen to one dollar






Trivia Game

#29, #30, and # 31 Page 218 & 219

Write a quiz app using SQLite

We'll discuss design in class, but I envision a screen where the player presses a button and it randomly selects a question, puts it on the screen with several answers, the player selects an answer and the app tells if its correct or not.

Randomly select a question from the database

I think you need to programatically build the question page, this will allow for a new question easier.

Then add a ADD, EDIT, and DELETE feature like the candy store app we did in class. Where the user can add,edit or delete questions and their answers.

You need a table with possibly 6 fields:

  • ID
  • Question
  • Answer1
  • Answer2
  • Answer3
  • Answer4

I recommend you design your table so that Answer 1 holds the correct answer.  When you display a question on the screen you'll need to scramble the answers.  

Have a "Toast" pop up telling them if their selection was correct or not.

If users hits incorrect answer then change the background color of the correct answer to let them know which was the correct answer.

Need a button to move the the next question

Use menu/toolbar to display the links to

  • Add
  • Edit
  • Delete

Screen schots of my Trivia Game Solution (I made state capitol trivia)


The last screen is the delete question screen where you just tap the qustion to delete it, like the candy store app. I also only have the Add, Delete, and Edit menu items on the initial page. I also pre-load the table with 17 state triva questions in the MainActivity.java, I just repeatdely call the add record from the database class and hard code the questions and answers. I blank out the table 1st so it doesn't keep adding those questions every time its played.

Start Screen  Initial Screen  Correct Answer  Wrong Answer  End  Add Question  Edit Question  Delete Question




Game of NIM

Let's do # 22 on page 246. The computer displays a random number of scicks from 10 to 20. Then you take turns, either with another player or with the comptuer, picking up 1, 2, or 3 sticks. You win by making the other player be the last to pick up a stick.

Initial NIM Screen 2nd NIM Screen 2nd NIM Screen 2nd NIM Screen

Against the Computer:
2nd NIM Screen 2nd NIM Screen 2nd NIM Screen Computer Won Screen Player Beat Computer

Adjusted for Landscape:
Here I made 2 new XML files for the initial play screen and the in-play screen. I used a horizontal linear layout and adjusted the margins for the initial screen. For the play screen I just adjusted the width of the buttons.
2nd NIM Screen 2nd NIM Screen

Final Project


Game Assignments