CSCI 3130, Summer 2019

CSCI 3130, Summer 2019
Assignment 2: Test-Driven Development (JUnit)
1. Use Test-Driven Development to implement a password strength validator.
Remember:
- write a JUnit test first before implementing anything new (commit the tests)
- make small changes to make the test pass (commit the changes)
- refactor (final commits)
Stage 1:
At this stage there is no UI, no Android Activity, just a class (Validator.java) with a
validate method that checks whether a string is a sufficiently strong password
according to some set of rules (not unit tests) and returns the number of rules that the
string passed. Begin with implementing these 2 rules:
- it is not “password” (case insensitive)
- it is at least 8 characters long
You are encouraged to create an empty android project to facilitate stage-3. Remember to
write your business logic for the password validation in the Validator.java class
Create a new GitLab Repository for your project, name it “password-validator”.
Make the repository private and add the user 3130markers as a maintainer. Push
your code to a new branch “a2-stage1”
Stage 2:
Next, define and implement at least 3 more rules of your own choosing (e.g. requiring at
least 1 special character, at least 1 digit, both upper and lower case).
The new rules should be pushed to a branch named “a2-stage2”
2. Create a simple Android interface that takes a password and provides feedback as
to its strength (using the class you created in (1)). Your interface needs an input text
field, button and output text. You can follow the example but are not required to:
Follow a TDD approach using Espresso (or Robolectric).
You can decide when to perform validation (i.e. dynamically
as the password is entered, or only after the password is
submitted). You are just required to indicate on the form
whether the password is strong enough. Additional details
(e.g. a red/green strength indicator bar, or providing a
generic message about what is required in a password) are
not required.
Push the code to a new branch called “a2-stage3”
Take a screenshot of your final running program, you can use the
emulator or a phone.
Hand in your assignment via Brightspace. Submit in a pdf file
- Link to your GitLab repository
- a screenshot of your running application (question 2)
Due date is posted on Brightsapce
Marking Scheme for A2 (20 marks):
- screenshot of running application: 1 mark
- if repo is not private: - 2 marks
A2Stage1 branch: (7 marks):
- code compiles: 1 mark
- test code exists and compiles: 1 mark
- 1 class with validate (or similar name) method implemented: 2 marks
- “password rule”: 1 mark
- >= 8 chars rule: 1 mark
- tests run and pass: 1 mark
A2Stage2 Branch: (8 marks)
- code compiles: 1 mark
- 3 new rules implemented: 3 marks (1 for each)
- the idea of a rule is abstracted into its own class: 2 marks
-> No validation logic in the UI Class
- tests run and pass: 2 marks
A2Stage3 Branch: (4 marks)
- code compiles: 1 mark
- Espresso code added: 1 mark
- password entry form with validation message: 2 marks

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected]

微信:codinghelp

原文地址:https://www.cnblogs.com/cibc/p/11011535.html

时间: 06-12

CSCI 3130, Summer 2019的相关文章

CSCI 370

Queens College, CUNY, Department of Computer ScienceSoftware EngineeringCSCI 370Spring 2019 c Sateesh R. Mane 2019Project 2graded in class after Spring Break 2019zip archive due May 18, 2019 Any student who submits Assignment 7 late will receive a gr

CSCI 2121: Computer Organization Assembly Language

CSCI 2121: Computer Organization andAssembly LanguageLab 5Design Sequential Circuits in Verilog IIIFebruary 27, 20191 Learning Objectives In this lab, you will use what we have learned about sequential circuits to implement differenttypes of shift re

CSCI 2132: Software Development

Assignment 6CSCI 2132: Software DevelopmentDue April 1, 2019Assignments are due on the due date before 23:59. All assignments must be submitted electronically via the course SVNserver. Plagiarism in assignment answers will not be tolerated. By submit

CSCI 3100 Unix and C

Your name:S number: Homework 3CSCI 3100 Unix and CNovember 4, 20191 Process and thread handling.How to submit?(a) Zip your source codes and a screenshot (cellphone pictures are OK) for each programmingproblem. Make sure to name your file in the forma

CSCI 1100 Computer Science

CSCI 1100 — Computer Science 1 Homework 8Bears, Berries and Tourists Redux: ClassesOverviewThis homework is worth 100 points toward your overall homework grade, and is due Wednesday,December 11, 2019 at 11:59:59 pm. It has three parts. The first two

高通CEO莫伦科夫:5G手机从2019年开始将成主流(转)

据路透社9月15日报道,高通公司首席执行官预测,首款符合下一代移动标准的5G手机将于2019年在全球主要市场上市,这比预测时间要早一年. 作为世界顶级智能手机芯片制造商,高通公司首席执行官史蒂文?莫伦科夫(Steven Mollenkopf)在接受采访时表示,消费者和商务需求不断增长,迫使5G手机加速普及,将原来的2020年提前至2019年,以升级新的网络和设备. 5G商业化对于诸如华为.诺基亚和爱立信等网络设备制造商以及三星电子和苹果等手机制造商的新功能和设备升级需求来说至关重要.升级到新的网

ural 2019 Pair: normal and paranormal

2019. Pair: normal and paranormal Time limit: 1.0 secondMemory limit: 64 MB If you find yourself in Nevada at an abandoned nuclear range during Halloween time, you’ll become a witness of an unusual show. Here Ghostbusters hold annual tests for new ve

poj 3130 How I Mathematician Wonder What You Are!

How I Mathematician Wonder What You Are! Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 3568   Accepted: 1906 Description After counting so many stars in the sky in his childhood, Isaac, now an astronomer and a mathematician uses a big

半平面交 模板 poj 3335 poj 3130 poj 1474 判断半平面交是否为空集

半平面交模板 const double pi= acos(-1.0); #define arc(x) (x / 180 * pi) const double EPS = 1e-8; const int Max_N = 105; struct Point{ double x,y; Point(){} Point(double x, double y):x(x),y(y){} Point operator - (Point p){ return Point(x- p.x , y - p.y ) ;