When one object is a specialized version of another object, there is an_________ between them.
- a. “is a” relationship
- b. innate association
- c. inherent union
- d. unbreakable union
In C#, if one object is a specialized type of another object, then there should be an “is a” relationship between those objects.
Hence, the correct answer is option “A”.
Explanation of Solution
“is a” relationship:
In C#, if one object is a specialized type of another object, then there should be an “is a” relationship between those objects. This is used to create the “is a” relationship among several classes.
For example:
- • A truck is a vehicle.
- • A circle is a shape.
Form the above example,
- • The first statement implies that the vehicle is a “base class” and truck is the “derived class”.
- ○ The “vehicle” is the parent of the “truck” in inheritance tree.
- • Similarly, second statement implies that the shape is a “base class” and “circle” is the “derived class”.
- ○ The “shape” is the parent of the “circle” in inheritance tree.
Explanation for incorrect options:
Innate association:
The innate association is not a “is a” relationship among those objects.
Hence, the option “B” is wrong.
Inherent union:
The inherent union is not a “is a” relationship among those objects.
Hence, the option “C” is wrong.
Unbreakable union:
The unbreakable union is not a “is a” relationship among those objects.
Hence, the option “D” is wrong.
Want to see more full solutions like this?
Chapter 10 Solutions
Starting out with Visual C# (4th Edition)
Additional Engineering Textbook Solutions
Starting Out with Python (4th Edition)
Problem Solving with C++ (10th Edition)
Starting Out with Programming Logic and Design (4th Edition)
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
C Programming Language
- Creates a class Student with 3 attributes: name, id and level. a. Add a constructor able to create a Student; b. Add the methods getId and getLevel; c. Add the method display able to display the attributes,arrow_forwardI can make the application but seem to always have issues with the Class UML Diagram. Below is the program I made and I attached the UML diagram. I was not completely sure about the Guest guest1 = new Guest (" ", " ") objects in the UML diagram. Any Advice? //-------------------First class: public class Guest { // Attributes belowprivate String firstName;private String lastName;//constructor belowpublic Guest(String firstName, String lastName) {this.firstName = firstName;this.lastName = lastName;} // Overloaded constructor belowpublic Guest() {this("No First Name Given", "No Last Name Given");} public String getFirstName() {return firstName;} public void setFirstName(String firstName) {this.firstName = firstName;} public String getLastName() {return lastName;} public void setLastName(String lastName) {this.lastName = lastName;} @Overridepublic String toString() {return firstName + " " + lastName;}} //------Second class import java.util.ArrayList; public class GuestList {public…arrow_forwardFor this portion of the assignment you will need to create the Employee class * based on the instructions in the API and have implemented the Equals method for that class. * * There is one parameter being passed as to this method that you will use as part of your solution:* An Employee object reference with the identifier testEmployee* * 1) Instantiate an instance of the Employee class using the default constructor and * assign it to an object reference with the identifier defaultEmployee* * 2) Instantiate an instance of the Employee class using the alternate constructor, * passing the following arguments:* name: "Keanu Reeves"* ID: 10010* salary: 78000.00* Assign the instance to an object reference with the identifier keanuEmployee* * 3) Declare a variable of type Employee with the identifier excellentEmployee and assign it * a reference to the same object that is being referenced by the keanuEmployee object reference. * 4) Construct a selection statement that tests if testEmployee is…arrow_forward
- Creates a class Student with 3 attributes: name, id and level. a. Add a constructor able to create a Student; b. Add the methods getId and getName; c. Add the method display able to display the attributes,arrow_forwardCreate a class of Customer with custName, custAddress, custCnic, custPhone, custType. Create another class of Employee with empName, empAddress, empCnic, empPhone, empType (tele-callrs , doc boy, sales executive , back office). You have to provide both default and parametrized constructors.arrow_forwardCreates a class called Member with two integer x and y. a. Add a constructor able to create a Member object with tow integers and the default values 0,0; b. Add the methods setX and setY to modify the attributes x and y; c. Add the method display able to display the attributes,arrow_forward
- What association is it called where child's object purpose is not lost if parent object is lost ? * 2 points None of the above Composition Aggregation Encapsulationarrow_forward/** * A constructor that takes an existing user as well as a new userID. * It should create a new user with the newID given (which has the * same requirements as above), and the same tweets as the old user * that is being passed in. Information about the number of followers * or list of users the old user is following should not be copied. * All other instance variables should be initialized appropriately. * It may be a good idea to call the other constructor here. * * @param old the existing TwitterUser whose tweets we are copying * @param newID the ID of the new user to be created */ publicTwitterUser(TwitterUserold,StringnewID){arrow_forwardUser: Make a class called User. Create two attributes called first_name and last_name, and then create several other attributes that are typically stored in a user profile. Makea method called describe_user() that prints a summary of the user's information. Make another method called greet_user() that prints a personalized greeting to the user.Then - Create several instances representing different users, and call both methods for each user. Admin: write a class called Admin that inherits from the User class. Add an attribute,privileges, that stores a list of strings like "can add post”, "can delete post”, "can banuser”, and so on. Write a method called show_privileges() that lists the administrator'sset of privileges. Then - Create an instance of Admin, and call your method.arrow_forward
- 1) Change the visibility of the variables and constructor in the Employee class to be more secure 2) Add an Admin class with the following features: a) The Admin class is a child of the Employee class b) Admin objects have an instance string password variable c) The Admin class has a 4 parameter constructor. One parameter sets the string, the other three parameters are used as arguments for a parent constructor call. d) Admin objects have an instance getInformation() method with a void return and an Employee object parameter. The method will request the calling Admin’s password and check user input. If input matches the password, the method will display the information of the Employee parameter Please use ***C Sharp** Language to answer the codearrow_forwardWhich of the following statements are true? Group of answer choices 1. A superclass reimplements the functionality of its subclasses. 2. A class that implements an interface reuses the functionality of the interface. 3. A derived class reuses the functionality instead of reimplements it. 4. If a class has no bugs, we can inherit from it without fear of having any bugs in our class.arrow_forwardPlease complete the following tasks: Write a class “Actor” that contains two attributes with the appropriate level of visibility explicitly defined. “Name” which is a String, Private, “NumberofAwards” which is an integer, private Write a default Constructor for this class that initializes the name to “Bob Smith” , and the number of awards to 0. Write an overload the constructor for this class that accepts actor’s name as a parameter Write accessor methods for each of the attributes. Write a method “winsAnOscar” that increases the number of awards by one and prints “The crowd applauds for <actor’s name>!” Be sure to use accessors where appropriate. Make sure your header is complete, with the appropriate level of visibility and any required keywords.arrow_forward
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT