Page 1 of 1

Could someone do this program for me, could you please at a main class(so 3 classes) where i will test the program.

Posted: Sun May 15, 2022 11:46 am
by answerhappygod
Could someone do this program for me, could you please at a main
class(so 3 classes) where i will test the program.
Could Someone Do This Program For Me Could You Please At A Main Class So 3 Classes Where I Will Test The Program 1
Could Someone Do This Program For Me Could You Please At A Main Class So 3 Classes Where I Will Test The Program 1 (70.85 KiB) Viewed 51 times
Coding (The code needs to be clean, or penalty will be applied) 1. Create a Project Student, then inside of the package 2. Create a class Course, which contains: a. Data members: i. String courseName ii. int credit iii. boolean is ComplimentaryCourse b. Methods: i. Default constructor: empty string for courseName, o for credit and false for isComplimentaryCourse ii. Constructor that takes courseName: 0 for credit and false for isComplimentaryCourse iii. Constructor with all three data members iv. Copy constructor v. toString: print a course with the following format: Course Name : Programming Credit :3 Complimentary: No vi. equals vii. Getter and setter 3. Create another class Student, which contains: a. Data members: i. static int nextld // start at 1 ii. Stringid // 0001 (4-digit number) iii. String firstName iv. String lastName v. String email // always lowercase vi. int age vii. Course course1 viii. Course course 2 b. Methods: i. Default constructor: give a new id to the student (nextld), leave firstName, lastName and email as "" and age as 0, and initialize Course by using its default constructor. ii. Constructor with firstName and lastName: give a new id to the student (nextld), leave the email as"" and age as o iii. Constructor with firstName, lastName, email and age, and two courses: give a new id to the student (nextld)

iv. Copy constructor: the new student has everything the same as the other student, except the id V. extractEmailAccount // extract the account (before the "@") of the email address. YOU HAVE TO IMPLEMENT THIS METHOD WITH for LOOP. NO contains(). indexOf() or lastindexOf(), substring() in the String class are allowed. vi. isEmailValid // check if there is a "@" and a ".", the "@" must appear before the ".", also, the "@" cannot be the first character, the "" cannot be the last character. YOU HAVE TO IMPLEMENT THIS METHOD WITH for LOOP AND if STATEMENT. NO contains(), indexOf() or lastindexOf() in the String class are allowed. vii. toString Name : Hanif Azhar ID : 0001 // always 4 digit for an id Age Email : [email protected] Course 1: Programming 1 (3 credits] Course 2: Programming 2 (3 credits] viii. equals ix. getter and setter : 34