Question

To conclude the project, use the UML diagram you created last week and create an application in Visual Studio named School. O
<<Java Class>> GPerson (default package) firstName: String a lastName: String dateOfBirth String idNumber. String Person oget
To conclude the project, use the UML diagram you created last week and create an application in Visual Studio named School. Once you have written the code, be sure and test it to ensure it works before submitting it. Below is the UML diagram for the basic class we created last week for your reference, but for this project be sure you use the one that you created last week. Good luck and be sure to get started early in case you have questions. This is due Sunday by 11:55 p.m.
GPerson (default package) firstName: String a lastName: String dateOfBirth String idNumber. String Person ogetFirstName0String setFirstName(String) void o getLastName0 String setLastName(String).void ogetGender0 char e setGender(char) void ogetDateOfBirth String o setDateOfBirth String) void o getldNumber0 String e setldNumber(String)void
0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts, please give me comment...

class Person{

String firstName;

String lastName;

char gender;

String dateOfBirth;

String idNumber;

Person(){}

/**

* @return the firstName

*/

public String getFirstName() {

return firstName;

}

/**

* @param firstName the firstName to set

*/

public void setFirstName(String firstName) {

this.firstName = firstName;

}

/**

* @return the lastName

*/

public String getLastName() {

return lastName;

}

/**

* @param lastName the lastName to set

*/

public void setLastName(String lastName) {

this.lastName = lastName;

}

/**

* @return the gender

*/

public char getGender() {

return gender;

}

/**

* @param gender the gender to set

*/

public void setGender(char gender) {

this.gender = gender;

}

/**

* @return the dateOfBirth

*/

public String getDateOfBirth() {

return dateOfBirth;

}

/**

* @param dateOfBirth the dateOfBirth to set

*/

public void setDateOfBirth(String dateOfBirth) {

this.dateOfBirth = dateOfBirth;

}

/**

* @return the idNumber

*/

public String getIdNumber() {

return idNumber;

}

/**

* @param idNumber the idNumber to set

*/

public void setIdNumber(String idNumber) {

this.idNumber = idNumber;

}

}

class Faculty extends Person{

String officeHours;

String rank;

Faculty(){

super();

}

/**

* @return the officeHours

*/

public String getOfficeHours() {

return officeHours;

}

/**

* @param officeHours the officeHours to set

*/

public void setOfficeHours(String officeHours) {

this.officeHours = officeHours;

}

/**

* @return the rank

*/

public String getRank() {

return rank;

}

/**

* @param rank the rank to set

*/

public void setRank(String rank) {

this.rank = rank;

}

public String toString() {

return "Name: "+getFirstName()+" "+getLastName()+"\nGender: "+getGender()+"\nDate of Birth: "+getDateOfBirth()+"\nID Number: "+getIdNumber()+"\nOffice Hours: "+getOfficeHours()+"\nRank: "+getRank();

}

}

class Staff extends Person{

String title;

Staff(){

super();

}

/**

* @return the title

*/

public String getTitle() {

return title;

}

/**

* @param title the title to set

*/

public void setTitle(String title) {

this.title = title;

}

public String toString() {

return "Name: "+getFirstName()+" "+getLastName()+"\nGender: "+getGender()+"\nDate of Birth: "+getDateOfBirth()+"\nID Number: "+getIdNumber()+"\nTitle: "+getTitle();

}

}

class Student extends Person{

int status;

Student(){

super();

}

/**

* @param status the status to set

*/

public void setStatus(int status) {

this.status = status;

}

/**

* @return the status

*/

public int getStatus() {

return status;

}

public String toString() {

return "Name: "+getFirstName()+" "+getLastName()+"\nGender: "+getGender()+"\nDate of Birth: "+getDateOfBirth()+"\nID Number: "+getIdNumber()+"\nStatus: "+getStatus();

}

}

Add a comment
Know the answer?
Add Answer to:
To conclude the project, use the UML diagram you created last week and create an application in Visual Studio name...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • To conclude the project, use the UML diagram you created last week and create an application...

    To conclude the project, use the UML diagram you created last week and create an application in Visual Studio named School. Once you have written the code, be sure and test it to ensure it works before submitting it. Below is the UML diagram for the basic class we created last week for your reference, but for this project be sure you use the one that you created last week. Good luck and be sure to get started early in...

  • In c# So far, you have created object-oriented code for individual classes. You have built objects...

    In c# So far, you have created object-oriented code for individual classes. You have built objects from these classes. Last week, you created a UML for new inherited classes and objects. Finally, you have used polymorphism. When you add abstraction to this mix, you have the “4 Pillars of OOP.” Now, you begin putting the pieces together to create larger object-oriented programs. Objectives for the project are: Create OO classes that contain inherited and polymorphic members Create abstracted classes and...

  • Create a NetBeans project called "Question 1". Then create a public class inside question1 package called Author according to the following information (Make sure to check the UML diagram)

    Create a NetBeans project called "Question 1". Then create a public class inside question1 package called Author according to the following information (Make sure to check the UML diagram) Author -name:String -email:String -gender:char +Author(name:String, email:String, gender:char) +getName():String +getEmail):String +setEmail (email:String):void +getGender():char +tostring ):String . Three private instance variables: name (String), email (String), and gender (char of either 'm' or 'f'): One constructor to initialize the name, email and gender with the given values . Getters and setters: get Name (), getEmail() and getGender (). There are no setters for name and...

  • CS1180 Lab 9 Students will learn how to create a user-defined class. Part 1. Create a...

    CS1180 Lab 9 Students will learn how to create a user-defined class. Part 1. Create a user-defined class. 1. Follow the UML diagram below to create a user-defined class, Automobile When implementing the constructors, use the default value of 0 for numeric types and "unknown" for VehicleMake and VehicleModel when not given as a parameter Implement the toString method in a format ofyour choosing, as long as it clearly includes information for all four member variables Make sure to include...

  • Objectives: GUI Tasks: In Lab 4, you have completed a typical function of music player --...

    Objectives: GUI Tasks: In Lab 4, you have completed a typical function of music player -- sorting song lists. In this assignment, you are asked to design a graphic user interface (GUI) for this function. To start, create a Java project named CS235A4_YourName. Then, copy the class Singer and class Song from finished Lab 4 and paste into the created project (src folder). Define another class TestSongGUI to implement a GUI application of sorting songs. Your application must provide the...

  • I'm trying to use LucidChart to create a UML use case diagram for a car dealership...

    I'm trying to use LucidChart to create a UML use case diagram for a car dealership program that tracks sales and reports metrics per employee. But I just can't seem to wrap my head around it. I've screenshot the classes I created. We apparently have to inlude the get() and set() methods to incorporate as "information hiding"...and I think that's the part that's confusing me. Everytime I make some progress I just get confused and can't find any good examples...

  • using C++ language!! please help me out with this homework In this exercise, you will have...

    using C++ language!! please help me out with this homework In this exercise, you will have to create from scratch and utilize a class called Student1430. Student 1430 has 4 private member attributes: lastName (string) firstName (string) exams (an integer array of fixed size of 4) average (double) Student1430 also has the following member functions: 1. A default constructor, which sets firstName and lastName to empty strings, and all exams and average to 0. 2. A constructor with 3 parameters:...

  • The current code I have is the following: package uml; public class uml {        public...

    The current code I have is the following: package uml; public class uml {        public static void main(String[] args) {              // TODO Auto-generated method stub        } } class Account { private String accountID; public Account(String accountID) { this.accountID = accountID; } public String getAccountID() { return accountID; } public void setAccountID(String accountID) { this.accountID = accountID; } @Override public String toString() { return "Account [accountID=" + accountID + "]"; } } class SuppliesAccount extends Account { private...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT