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
- When a class declares an entire class as its friend, the friendship status is reciprocal. That is, each class's member functions have access to the other's private members. True Falsearrow_forwardThe Class: (CHECK ALL THAT APPLY) is the definition or "blueprint" defines a list of attributes and methods is an example of a data type is an instance of something in memory An object: (CHECK ALL THAT APPLY) is a variable is created by a constructor is an definition or "blueprint" is an instance of something in memory Two types of class members are ____________ and _____________ objects and classes conditions and non-conditions attributes and methods objects and methodsarrow_forwardLibrary Information System Design and Testing Library Item Class Design and TestingDesign a class that holds the Library Item Information, with item name, author, publisher. Write appropriate accessor and mutator methods. Also, write a tester program(Console and GUI Program) that creates three instances/objects of the Library Items class. Extending Library Item Class Library and Book Classes: Extend the Library Item class in (1) with a Book class with data attributes for a book’s title, author, publisher and an additional attributes as number of pages, and a Boolean data attribute indicating whether there is both hard copy as well as eBook version of the book. Demonstrate Book Class in a Tester Program (Console and GUI Program) with an object of Book class.arrow_forward
- Draw the follClass Structure: 1. NotificationSystem: This is the main class that manages the notification system. It has the following attributes and methods: - Attributes: - users: a list of User objects representing all the users registered in the system - tweets: a list of Tweet objects representing all the tweets posted in the system - Methods: - register_user(user): adds a new user to the system - post_tweet(user, message): posts a new tweet on behalf of a user - get_timeline(user): returns a list of tweets from all users that the specified user follows - get_mentions(user): returns a list of tweets that mention the specified user 2. User: This class represents a user in the system. It has the following attributes and methods: - Attributes: - username: a string representing the username of the user - followers: a list of User objects representing all users who follow this user - following: a list of User objects representing all users whom this user follows -…arrow_forwardCreate an Employee Class with the ff: attributes: = String name = double salary = String birthday = __init__(self, name, salary, birthday) = String getDetails() -- returns a String value that represents all the information of the Employee object Create a Manager class that inherits Employee, a Manager will also have the ff: = String department = __init__(self, name, salary, birthday, department) = String getDetails() -- returns a String value that represents all the information of the Manager object Create a Director class that inherits Manager, a Director will also have the ff: = double carAllowance = __init__(self, name, salary, birthday, department, carAllowance) = def playGolf() -- will print a string value '{name of director} plays golf' = String getDetails() -- returns a String value that represents all the information of the Director object Create 2 objects of each class and call their respective getDetails() method. Do not write WET codes, be sure there's no…arrow_forwardObjectives: At the end of this activity, you should be able to: define classes implement polymorphism and inheritance instantiate an object array apply Exception to all input validations create a Java application for multiple users Procedure: Create a NetBeans project for this activity. The project name should be as follows: o Client (the main class that contains the main method and the implementation of the main menu) o Credit (the class where attributes and methods are defined) The class names to be created are the following: o Client<your_last_name> Ex. ClientBlancoo Credit<your_last_name> Ex. CreditBlanco All class names must be suffixed with your last name. Note that the object to be instantiated in the main method is an object array.For example: CreditBlanco [ ] cb = new CreditBlanco [100]; Compress the NetBeans project into .rar or .zip format and then upload to the link provided in the LMS. Only NetBeans project compressed in .rar or .zip format will be…arrow_forward
- The Point2D should store an x and y coordinate pair, and will be used to build a new class via class composition. A Point2D has a x and a y, while a LineSegment has a start point and an end point (both of which are represented as Point2Ds). class Invariants The start and end points of a line segment should never be null Initialize these to the origin instead. Data A LineSegment has a start point This is a Point2D object All data will be private A LineSegment also has an end point. Also a Point2D object Methods Create getters and setters for your start and end points public Point2D getStartPoint() { public void setStartPoint(Point2D start) { Create a toString() function to build a string composed of the startPoint’s toString() and endPoint’s toString() Should look like “Line start(0,0) and end(1,1)” Create an equals method that determines if two LineSegments are equal public boolean equals(Object other) { if(other == null || !(other instanceof LineSegment)) return…arrow_forwardTo determine if two objects in a class are equal, we should NOT use "==". We should override the _____ method of the Object class with our own definition of equality.arrow_forwardWhen 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 unionarrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning