GithubHelp home page GithubHelp logo

cliffpanos / water-reporter-ios Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 91.35 MB

CS 2340 Team Project to create a crowd-sourced app for water reporting

Swift 49.41% Ruby 0.03% Objective-C 49.15% C 0.88% Shell 0.52%

water-reporter-ios's People

Contributors

cliffpanos avatar dbecker1 avatar

Watchers

 avatar  avatar  avatar

water-reporter-ios's Issues

Controller Changes

Now we have to make the view cooperate with the model. To do this, we must add items to the StudentEditController class.

  • Add an @FXML reference to the widgets you added for class standing. This is how you will pull data out of the widget to pass to the model. Be sure the spelling for the fxid matches what is in the .fxml file exactly.
  • Edit the initialize method to handle any start-up code you need. If you used a combobox like me, this is where you will populate the box with the different classes (Freshman, etc). Remember that calling values() on an enum will give you an array. You will need to wrap this in an ObservableList. Possibly use a static helper function.
  • Edit the setStudent method to set your widget to a default value
  • Edit the OK button press to pull the information out of your new widget and put into the student instance.
  • If you used a free text entry field, you will need to edit the isInputValid method to check that a valid class was entered. If you used a constrained widget like radio buttons or combo box where it is impossible to enter a bad value, then you do not have to do any validation.

Now run the app. You should be able to enter new students and their standing and see it reflected in the UI. if not, then check your code through the complete stack. Are you calling the setters in the model to update the information? Are you pulling the information out of the widget correctly?

Login Design

Story Tasks

  • Create a Context Diagram for the system
  • Brainstorm and list 10 user stories. (You may have fewer if you can cover the entire system in fewer)
  • Each person on the team pick 1 user story and fully elaborate, including acceptance scenarios

Setup Git

First, download and install git. Next, create a new repository and name it "repository." Download the M2 resource file and unzip it into the repository. Create a branch called original. Clone out the M2 project. Make sure to leave original unmodified and make changes on the master branch.

Login Implementation

Task Details

  • Create your team's Android Project and Import into Git
  • Create an opening or welcome screen which has options for Login and Registration. You may have some other method of differentiating login and registration, if you do not want an opening screen.
  • If someone selects Login, then you should display a way to enter the user name and password.
  • If someone requests login, you should check for the correct user name and password. For this first milestone, you may have a hard coded user with name "user" and password "pass" to check against.
  • If the login matches user name / password then go to your application. Otherwise, notify of the bad login attempt.
  • Canceling the login (press Cancel or going back a screen for example) will close out the login attempt , but no information is recorded and the application does not start up. Note here you are not explicitly required to have a cancel button, just a way to back out of the login.
  • Once in the application, there should be a way to logout. After logging out, the application should return to the welcome / opening page.

Acceptance Criteria

Given: A registered user selects login
When: The user name and password match and are stored in the database
Then: The application logs in the user correctly

Given: A registered user selects login
When: The username and password do not match / are not stored in the database
Then: The application notifies the user that the login attempt has failed

Given: A registered user selects login
When: The user backs out of the login screen
Then: No information is recorded, and the application does not start up

Build Gradle Files

Each individual team member will create a build file using gradle that will allow you to perform key tasks to build the application.

Story/Task Details

Note: Your gradle file should
compileJava compiles and builds the project
compileTest compiles the unit tests for the project
javadoc creates the html documentation for the project
clean removes all the files created by this project
jar creates the executable jar file for this project

To run gradle with your file, use the -b option. Example: gradle -bgburdell3.gradle. Build.gradle is the default if no file specified.

The jar task should be the default if no task is designated when running gradle. The default task is Otherwise, gradle will execute the task you request, for example: gradle compileJava will compile your java project.

Model Changes

Set-up framework for the Model Package

  • To support the class standing, we will first need to create a new class named ClassStanding which is an enum with the values FRESHMAN, SOPHOMORE, JUNIOR, and SENIOR. Give each class a two character representation "FR", "SO", "JR" and "SR".
  • Now add an attribute to Student which holds the ClassStanding enum.
  • Add getter and setter for the ClassStanding
  • Make a new 3 param constructor which includes name, major and class standing. Keep the old two param constructor for backwards compatibility and use constructor chaining to give a default class standing of Freshman.
  • Change the toString method to contain the class standing also.

Go ahead and run the app at this point. You should see all the students listed as before except with their classes shown. If you don't see the classes, be sure your constructor chaining is passing the freshman value to the 3 param version. Also be sure you added the class standing to the toString method.

View Changes

Open the StudentEditDialog.xml file. You will see that the dialog is laid out in a grid layout with labels and input fields.

  • Add to the grid some way to input the class standing, possibly use a combobox, but 4 radio buttons would work.
  • You could use a text field and type in the standing, but that is error prone and you would need to validate that an incorrect entry was not made.
  • Save

Now you should be able to run the app again. You should be able to hit the add student button and your dialog should pop up with your new UI features showing. It will not actually do anything yet, and if a combobox was used, it won't have any values in it.

Working With & Practicing Git

  • Edit and commit files to the GitHub repository
  • Each team member should complete the required method in their individual file and then commit the changes
  • Practice using a merge commit by having everyone simultaneously editing the edu.gatech.cs2340.antlab.pkg1.AntLabMain.java file at the indicated line
  • Practice adding and removing a text file from the top directory labeled readme.pn.txt (where pn is p1...p5 depending on which person you are) Include your name and email. Each team member should then delete their respective useless.pn.txt file
  • Use good descriptive Log comments for changes & commits
  • Roll back changes by viewing the original branch from an earlier step. Verify that none of the changes that we made are in the project version that we checked out
  • View Git logs by viewing the blame and graphs provided
  • View a difference between two versions of a file
  • Continue to work with git until we feel comfortable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.