Edinboro University

CSCI 374 Web Development
Spring 2021


Resources You'll need:


Week
Starting

 
1/25

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

 

2/1

Chapter 2

2/8

Chapter 3

2/15

  • 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
2/22

Chapter 4


3/1

 

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".

3/8

Chapter 5


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

Chapter 6

 

3/22

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

3/29

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

4/5

Chapter 7

 

 

4/12

Chapter 8

Chapter 9

 

4/19

Chapter 10

Chapter 11

Chapter 12

 

4/26 Catch up

Final Exam Period

Tuesday May 4th @ 10:15 am



 

     


Assignments

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

Due Date Description

HW-1
1/24

2/5

#11 and #12 Page 38.

HW-2
2/19

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

 

HW-3

2/26

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

 

HW-4

3/10

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

 

 

HW-5

4/15

 

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)

Notes:

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

 

HW-6

4/23

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

4/30

Game Assignments

Mason Biggie → Snake

Ryan Driver → Black Jack

James Kuhn → Wishing Well

Ethan Sayers → Concentration

Nickolas Slowikowski → Simple Space Invaders

Michael Sullivan → Liar's Dice

Derrian Ulmer → Mine Sweeper

Denare Whyatt → Connect Four