Question

Answer the following questions regarding the UML Diagram: Human 998 - name: String - breed: String + name: String + phone: In
0 0
Add a comment Improve this question Transcribed image text
Answer #1


In Given UML , attribute breed of class Cat has (-) minus sign before it,which indicate that it is a private attribute of Cat.

To indicate that an attribute is private, a class diagram would list the private visibility symbol a minus sign (–) before the attribute's name.

Hence ,it is already private.

Add a comment
Know the answer?
Add Answer to:
Answer the following questions regarding the UML Diagram: Human 998 - name: String - breed: String...
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
  • JAVA PLEASE HELP The following is a UML diagram for a class. Write the code for...

    JAVA PLEASE HELP The following is a UML diagram for a class. Write the code for this class. Cat - breed : String - color : Color - name : String + Cat( name : String) + Cat(name : String, breed : String, color : Color) + getName() : String + getColor() : Color + getBreed() : String setColor(Color) setBreed(Breed) toString()

  • Here is the UML for the class Contact -fullName : string -phoneNum: string -emailAddress : string...

    Here is the UML for the class Contact -fullName : string -phoneNum: string -emailAddress : string +Contact()                     //default constructor sets all attribute strings to “unknown”; no other constructor +setName(string name) : void +setPhone(string pn) : void +setEmail(string em) : void +getName() : string +getPhone() : string +getEmail() : string +printContact() : void         //print out the name, phone numbers and email address Create New Project Name your project: CIS247_Lab7_YourLastName. For this exercise, you may use a header file or one file...

  • USING THIS CODE: #include <iostream> #include <string> using namespace std; class Contact { //this class cannot...

    USING THIS CODE: #include <iostream> #include <string> using namespace std; class Contact { //this class cannot be viewed from outside of the private class. //only the class functions within the class can access private members. private: string name; string email; string phone; //the public class is accessible from anywhere outside of the class //however can only be within the program. public: string getName() const { return name; } void setName(string name) { this->name = name; } string getEmail() const {...

  • Write a full class definition for a class named Player , and containing the following members: A data member name of t...

    Write a full class definition for a class named Player , and containing the following members: A data member name of type string . A data member score of type int . A member function called setName that accepts a parameter and assigns it to name . The function returns no value. A member function called setScore that accepts a parameter and assigns it to score . The function returns no value. A member function called getName that accepts no...

  • Write in C++ please: Write a class named MyVector using the following UML diagram and class...

    Write in C++ please: Write a class named MyVector using the following UML diagram and class attribute descriptions. MyVector will use a linked listed instead of an array. Each Contact is a struct that will store a name and a phone number. Demonstrate your class in a program for storing Contacts. The program should present the user with a menu for adding, removing, and retrieving Contact info. MyVector Contact name: string phone: string next: Contact -head: Contact -tail: Contact -list_size:...

  • I need help with my code. It keeps getting this error: The assignment is: Create a...

    I need help with my code. It keeps getting this error: The assignment is: Create a class to represent a Food object. Use the description provided below in UML. Food name : String calories : int Food(String, int) // The only constructor. Food name and calories must be // specified setName(String) : void // Sets the name of the Food getName() : String // Returns the name of the Food setCalories(int) : void // Sets the calories of the Food...

  • GIVEN CODES *****Boat.java***** import java.util.HashSet; import java.util.Set; public class Boat { private String name; //private instance...

    GIVEN CODES *****Boat.java***** import java.util.HashSet; import java.util.Set; public class Boat { private String name; //private instance variable name of type String private String boatClass; //private instance variable boatClass of type String private int regNum; //private instance variable regNum of type int private Set<String> crew = new HashSet<String>(); public void setName(String name) { this.name = name; } public void setBoastClass(String boatClass) { this.boatClass = boatClass; } public void setRegNum(int regNum) { this.regNum = regNum; } public String getName() { return name;...

  • solve it in c++ 10 note: please do not give me same answer like this 1....

    solve it in c++ 10 note: please do not give me same answer like this 1. Define a Pet class that stores the pet's name, age, and weight. Add appropriate constructors, accessor functions, and mutator functions. Also define a function named getLifespan that returns a string with the value "unknown lifespan." Next, define a Dog class that is derived from Pet. The Dog class should have a private member variable named breed that stores the breed of the dog. Add...

  • Question 1 (4 mark): Implement a program with two classes according to the following UML diagram:...

    Question 1 (4 mark): Implement a program with two classes according to the following UML diagram: College -firstLab Student: StudentAccount - secondLab Student: StudentAccount +main (String (1) : void +College (String, String, int, int) : +printStudents(): void contains StudentAccount -name: String -studentNumber: int StudentAccount (String, int): +getName(): String +getStudentNumber(): int 2 REQUIREMENTS • The constructor College (String, String, int, int) shall create two component objects of type StudentAccount, i.e., the first lab student and the second lab student, and initialize...

  • // (a) print the name and courseCode of the dynamically created course above to screen //...

    // (a) print the name and courseCode of the dynamically created course above to screen // ... // (b) change the value of courseCode of the dynamically created course above to "BIO 101" // ... // (c) print the name and code of the dynamically created course above again on the screen // ... // #include #include using namespace std; class courseType { private: string name; string courseCode; public: courseType(string theName = "Default name", string theCode= "Default code") { name...

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