-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help me fix the error #445
Comments
这是来自QQ邮箱的自动回复~唐凯冰已收到你的邮件,若有急事,请短信或者电话联系
|
您好,您的邮件已经收到,我会尽快回复。祝身体健康,工作顺利!
|
这是来自QQ邮箱的假期自动回复邮件。
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
邮件已收到,我会尽快给你回复。
|
好的,已收到,谢谢!
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import java.util.Random;
import java.time.LocalDate;
public class SP2024_DriverLicenseCandidate_Dahal {
private String candidateName;
private String SSNumber;
private String address;
private char[] keyArray;
private char[] answerArray;
// no-argument constructor
public SP2024_DriverLicenseCandidate_Dahal() {
this.keyArray = new char[25];
this.answerArray = new char[25];
}
// parameterized constructor
public SP2024_DriverLicenseCandidate_Dahal(String candidateName,String SSNumber, String address, char[] answerArray) {
this.candidateName = candidateName;
this.SSNumber = SSNumber;
this.address = address;
this.keyArray = new char[25];
this.answerArray = answerArray;
}
// method to evaluate the test result
public int[] evaluateResult() {
int[] resultArray = new int[25];
for (int i = 0; i < 25; i++) {
if (keyArray[i] == answerArray[i]) {
resultArray[i] = 1;
}
}
return resultArray;
}
// method to generate the Driver License Number
public String generateDriverLicenseNumber() {
Random random = new Random();
StringBuilder licenseNumber = new StringBuilder();
for (int i = 0; i < 8; i++) {
licenseNumber.append(random.nextInt(10));
}
return licenseNumber.toString();
}
// method to convert the resultArray to a string
public String getResultString(int[] resultArray) {
}
// method to convert the answerArray to a string
public String getAnswerString() {
StringBuilder answerString = new StringBuilder();
for (int i = 0; i < 25; i++) {
answerString.append(answerArray[i]).append(" ");
}
return answerString.toString();
}
// toString method to display the test result
public String toString() {
int[] resultArray = evaluateResult();
return getResultString(resultArray);
}
}
The text was updated successfully, but these errors were encountered: