In this assignment, you will create the User and Validator classes to answer questions about whether the data was entered correctly.
1) Create class User
2) This class must contain fields: firstName, secondName, id, age, gender, password, dateOfBirth.
3) All of the fields must to have Private access modifier.
4) id should be generated automatically.
5) Create constructor that accepts these fields
6) Create setter and getter functions for each field
7) Create function which prints all fields.
8) Create class Validator.
9) Create checkAge method to check if user has full 18.
10) Create checkPassword method. Password must contain at least 1 uppercase letter, 1 lowercase letter, 1 digit, 1 special symbol(@,$,!,^) and length more or equal to 8.
11) Create checkDate method. Date should follow dd/mm/yyyy pattern.
12) Create driver code inside of main() function which allows user to input data in console. All fields cannot be empty. If user entered some field wrong way the program should give an appropriate error.
你是需要代码还是需要翻译,先自己研究一下啊,创建User 和Validator 类总会吧,getter setter 方法总会吧,上来就把所有的问题扔出来???
让你写检验密码,检验年龄,检验日期的方法,怎么校验,返回值是什么,写明白就好了。首先有一个大的思路,一个功能点一个功能点的去实现就行
要做一个 scenario design, 用户需要解决什么问题, 你的各个类 class 是怎么合起来解决这些问题的? 可以从小的应用开始写, 循序渐进。
你要写清楚,你尝试了什么办法,你碰到了什么具体问题。
求助啥?英文翻译?
不需要翻译,我们是英文教学的。但是我就会创建类,getter和setter,老师讲了一点,语言不通外加老师讲的快,没听懂。那我自己先看看吧。