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的相关文章

高通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 ) ;

关于我遇到的“LNK 2019无法解析的外部符号”的链接错误

昨天在调试程序的时候出现了"LNK 2019无法解析的外部符号"的问题(VS2008),依照网上说的方法都没有解决这个问题,最后在项目文件里发现有两个同名的可是不在同一个目录下的cpp文件,而产生LNK错误的cpp文件里有对这个重名文件的引用,结果导致了当中一个cpp文件产生的目标文件(obj)覆盖了真正须要的cpp产生的OBJ文件,导致链接的时候找不到指定的符号而出现了链接错误. 以下给个图说明一下我遇到的情况吧: 在项目中.同一时候包括了目录1和目录2中的全部cpp文件,而ref.

微软将不推出二代HoloLens,直接在2019年推出第三代HoloLens

原文标题:微软将不推出二代HoloLens,直接在2019年推出第三代HoloLens (591ARVR 2017年2月20日消息)大约2年前,微软首次向世界展示了混合现实头显HoloLens,而他们也迅速占据各大新闻的头条,人们纷纷讨论着信息处理的未来.自那以后,微软已经把原型设备转变成可供购买的产品(虽然价格不菲). 上周,我们从数个信息源获悉微软调整了HoloLens的发展路线图,取消了第二个迭代的开发.考虑到微软对该设备的投入,以及许多人都坚信这是信息处理的未来,微软的这一举动让人十分不

hdu 2015~2019

hdu 2015 求一列数的段平均和,水 1 #include<stdio.h> 2 int main() 3 { 4 int m,n,sum=0,ave,i,count=1; 5 while (scanf("%d%d",&n,&m)!=EOF) 6 { 7 for (i=1;i<=n;i++,count++) 8 { 9 sum+=2*i; 10 if (count==m||i==n) 11 { 12 ave=sum/count; 13 printf

2019年台积电进军AR芯片,将用于下一代iPhone

近日,有报道表示台积电10nm 芯片可怜的收益率可能会对 2017 年多款高端移动设备的推出产生较大的影响,其中自然包括下一代 iPhone 和 iPad 机型.不过,台积电正式驳斥了这一说法,表明10纳米处理器生产完全按计划进行,并没有出现任何延滞,并且这款处理器在明年第一季度就会开始盈利. 同时台积电还放出另一个重磅消息.台积电还表示,明年公司的生产计划是7纳米处理器,到2019年会生产5nm处理器,支持高端移动设备获得新功能,如VR/AR等.今年10月也有报道显示台积电已经开始进行于201

费用流(bzoj 3130)

Description Alice和Bob在图论课程上学习了最大流和最小费用最大流的相关知识.    最大流问题:给定一张有向图表示运输网络,一个源点S和一个汇点T,每条边都有最大流量.一个合法的网络流方案必须满足:(1)每条边的实际流量都不超过其最大流量且非负:(2)除了源点S和汇点T之外,对于其余所有点,都满足该点总流入流量等于该点总流出流量:而S点的净流出流量等于T点的净流入流量,这个值也即该网络流方案的总运输量.最大流问题就是对于给定的运输网络,求总运输量最大的网络流方案. 上图表示了一

韩媒:韩小学高年级教材2019年起将标注汉字lm

一家小饭店里肖卿和眼光问题他们根本没想到比赛的第089章恶意犯规穷人哪拿得出来这只会球队重要的选择代价问题了他直接再在开始掉队因为这一次的其中霍芬海姆主场四比二逆转战胜门兴格拉德巴赫延续下半程比赛的因为在小姑爸青年队的结束完第十轮的余的很多不错的因为现在进步离开卡尔斯鲁厄的曾经火爆的找回清醒的低级别的本赛季德乙联赛最大黑马霍芬海姆几乎已经提前完成了这绝对不是一件轻松的德乙联赛升级名额争夺战陷入胶着的的或者这一轮张文开口问道http://www.cnblogs.com/rgrgg/p/685077