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
- True or False A class can implement more than one interface.arrow_forwardA TV Class The attributes of a TV object are the channel, the volume, and a flag (or switch) indicating whether the TV is on or off. The methods perform the following actions: • Turn the TV on or off. • Set the channel to an integer from 0 to 99 inclusive. • Raise or lower the volume by one unit. The volume can range from 0 to 20. • View the value of the volume. • View the channel. • Determine whether the TV is on or off. Write a TV class that implements all relevant functions. A newly created TV object is set to off with the channel set to 2 and the volume initially 10. Include a main(...) method that tests the methods of the TV class.arrow_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_forwardJava please svalb mearrow_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_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_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_forward
- 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 unionarrow_forwardOverview: A new bank wants to make a simple application to keep track of all accounts and transactions. it is required to help the bank manager implement the required application. Requirements: After a quick meeting with the bank manager, you got the following information: • tis required to store all bank accounts in one collection and all the transactions happened in another collection. Each account has a unique account number, a holder and balance. There is a specific prefix (common for all accounts) that should be added to the holder's civil id to create the unique account number. In addition, it is not allowed for a holder to have more than one account. Furthermore, only three transactions are allowed on any account: deposit, withdrawal and transfer money to another account. • Each holder has a unique civil ID (national id), a name and other attributes (add at least 2 attributes from your choice). • For each transaction, it is required to store the account(s) affected, amount of…arrow_forward7. When a class contains objects of another class, the relationship is called a whole-part relationship or composition. The relationship created is also called a has-a relationship. Discuss some of the possible issues with composition, such as the long statement: Outputsales.getHighestPaidEmployee().getHireDate().getYear().arrow_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