2. Consider the BlackJackCard and PlayingCard classes. a)Do these two classes have an is-a or has-a relationship? b)Which class is the more general class? c)Which class is the more specialized class?
Q: This code segment read f, k. Using a define sub procedure (SU) to determine the value of S of the…
A: Code segment which means the text segment or simply the text portion is an portion of an object file…
Q: Analyze the similarities and differences between Binary Search Trees and AVL Trees. Is it possible…
A: Introduction: The binary search tree is a binary tree in which the left child has a lower value than…
Q: A non-pipelined CPU's clock cycle time is less than a pipelined CPU's
A: Answer:
Q: To avoid fundamental race conditions, Linux offers a collection of routines that guarantee atomic…
A: When two processes simultaneously read a value from within a programme and then write back a new…
Q: 3. Explain why the relationship between the PlayingCard, Rank and Suit classes is not an is-a…
A: 3. Whenever one class inherits another class or one interface inherits another interface, it is…
Q: Which SQL statement below does the following MongoDB script most closely correspond to?…
A: Above query answer in below step.
Q: A programme with user-defined functions needs to provide function prototypes.
A: The compiler is provided with information by a function prototype that indicates the function may…
Q: It's important to understand what the word "operating system" truly means to individuals. Explain…
A: Operating system: An operating system (OS) is the software that controls all other application…
Q: Which of the following is NOT a binding time? O Run time O Compile time O Hammer time O Language…
A: . The time during program organization or processing when this choice is made is defined as the…
Q: Create a table named Clerks, with 3 columns (employee-id, first name and job_id) where all employees…
A: The question has been answered in step2
Q: vide an example of the qualities of a computer's central proc
A: Introduction: The central processing unit, or CPU, is found in all types of computer devices,…
Q: In Java, which data type stores true or false as a value?
A: Data types are various sizes and values that can be put away in the variable that is made according…
Q: Only one form of memory may be improved, so which one would you choose and why? The three types of…
A: Only one form of memory may be improved, so which one would you choose and why? The three types of…
Q: Computer programmes are tested and debugged in two unique ways:
A: Intro Let's examine the distinction between debugging and testing computer programmes. software…
Q: Give an explanation of the two most important advantages of using a binary search tree (referenced…
A: Answer:
Q: (w = [1 0-9; 2 -2 0; 1 2 3];). What is the value of w(2,1) ? O o O undefined 02 O the whole second…
A: A number of objects arranged in a usually straight line a row of bottles.
Q: Simplify the difference between the types of multiprocessing: What are the advantages and…
A: Multiprocessing: A multiprocessor computer hardware design known as symmetric multiprocessing (SMP)…
Q: What is the difference between file encryption and disc encryption when it comes to security?
A: Please refer below for your reference: File encryption: A file or folder encryption system encrypts…
Q: In the C++ programming language, the function can call itself True O False
A: When a program calls the function, the program control is transferred to the called function. When…
Q: Through the use of interface cards, an expansion bus links the CPU to peripheral devices. why?
A: This is an explanation for what happened: An extension bus is a kind of computer bus that moves data…
Q: Consider the security concerns and potential of cloud computing. Provide specific examples when…
A: Cloud security architecture: All the hardware and technology used to safeguard data, workloads, and…
Q: Explore Mafiaboy's adventures on the Internet. Furthermore, he had to know how and when he gained…
A: Attack of Mafiaboy: The Mafiaboy case is well-known across the globe because to the fact that it…
Q: Describe the methods that a system requirements engineer may use to keep track of the connections…
A: NOTE :- Below i explain the answer in my own words by which you understand it well. How should…
Q: how to comprehend and define an integrated information system from an organisational and…
A: Given: What is an integrated information system, and how can you understand and describe it from an…
Q: 5% error vector magnitude (EVM) means that the root mean square (RMS) error magnitude is 1/20 of the…
A: The Root Mean Square (RMS) of the error vectors is computed and given as a percentage of the EVM…
Q: Are there any differences between computer architecture and computer organisation? Please offer…
A: Given: What is computer architecture? How computers are organised. System architecture describes…
Q: One of the four methods of access control might be used in this scenario. What factors play a role…
A: Access control, a security strategy, controls who or what can view or utilize resources in a…
Q: PASCAL is an example of a programming language that uses pseudo-code.
A: Pseudo Code: Desirable pseudocode is often facilitated by words like set, reset, increment, compute,…
Q: Is cloud security compromised by a data breach? Is there anything you can tell me about…
A: Introduction: Information theft, ransomware, phishing, password guessing, viruses, malware,…
Q: After a data breach, can cloud security be improved? Some potential countermeasures include, but are…
A: Cloud loss: Data breach is the intentional or inadvertent exfiltration of secure/confidential data…
Q: Consider a currency system that has the following coins and their values: dollar (100 cents),…
A: Given a value V, if we want to make change for V cents, and we have infinite supply of each of C = {…
Q: Many of the drawbacks of cloud computing go unnoticed or are misinterpreted.
A: Servers, storage, databases, networking, software, analytics, and intelligence are all examples of…
Q: In Java, which is the correct syntax for initializing a variable? - int a; - double gpa = 3.54; -…
A: Option 1 : int a; It is correct syntax for declaring a int value if we want to declare static…
Q: Create a program that will find the solution of any linear system in two variables. The user will…
A: Create a program that will find the solution of any linear system in two variables. The user will…
Q: Compilers have a bigger problem with VLIW or superscalar. Why?
A: the single main motivation static compiler procedures bomb versus OoO is that OoO machines can…
Q: Which regions and zones can help improve the robustness, performance, availability, and resilience…
A: Given: If they have a device that can connect to the internet, users of cloud computing may access…
Q: how many time the following program will * print the message? in C++ int i = 1 ; i = i 1; - while(i)…
A: C++ Many people believe that C++, an object-oriented programming (OOP) language, is the finest…
Q: Which problems must be solved by an operating system in order to make advantage of an architecture…
A: The question has been answered in step2
Q: performing online research The escapades of Mafiaboy When and how did he first begin hacking into…
A: When Mafiaboy said he had shut down the DELL website, which was not public information then, the FBI…
Q: What is acosd(x)function in Matlab do? O O O O Calculates the inverse cosine of x. The resulting…
A: Solution is given below :
Q: VLIW or superscalar, which is more harder for compilers to implement? Why?
A: Introduction: "Very long instruction word" (VLIW) is a computer processing architecture in which a…
Q: Identify the difference between cloud-based and on-premises network services and applications.
A: Introduction: Processing in the cloud refers to the on-demand availability of computer system…
Q: Distinguish between symmetric and asymmetric multiprocessing methods. What are the advantages and…
A: Symmetric multiprocessing : Symmetric multiprocessing is more expensive than asymmetric…
Q: The Mach number is a critical quantity in aerodynamics. It is the ratio of the speed of an object…
A: Step 1 : Start Step 2 : Take user input for the Speed of the Aircraft and the Speed of the Sound.…
Q: Computer programmes are tested and debugged in two unique ways:
A: Answer:
Q: Some effective cloud data backup methods include:
A: Cloud backup also known as online backup or remote backup, it is method for sending a copy of a…
Q: Wireless networks have a lower bandwidth capacity than conventional networks.
A: Definition: When delivering a signal, the bandwidth refers to the breadth of the frequency inside a…
Q: It's important to know what computer science is and what makes it distinct from other academic…
A: Computer science is the process of solving complex organizational problems using technical…
Q: In Java, what will the following statement output? System.out.println("Hello " + 2 + 0 + 1 + 9…
A: let's see the output of the statemnet
Q: List, BST (binary search trees), and AVL all have different search time difficulties; describe how…
A: Given: We need to bring attention to the amount of time that is spent searching in list, BST, and…
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
2. Consider the BlackJackCard and PlayingCard classes.
a)Do these two classes have an is-a or has-a relationship?
b)Which class is the more general class?
c)Which class is the more specialized class?
d)Would the four methods from the general class be appropriate in the specialized class? Explain your answer.
e)Give one example of a method that might appear in the specialized class but not the more general class.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- java programming language You are part of a team writing classes for the different game objects in a video game. You need to write classes for the two human objects warrior and politician. A warrior has the attributes name (of type String) and speed (of type int). Speed is a measure of how fast the warrior can run and fight. A politician has the attributes name (of type String) and diplomacy (of type int). Diplomacy is the ability to outwit an adversary without using force. From this description identify a superclass as well as two subclasses. Each of these three classes need to have a default constructor, a constructor with parameters for all the instance variables in that class (as well as any instance variables inherited from a superclass) accessor (get) and mutator (set) methods for all instance variables and a toString method. The toString method needs to return a string representation of the object. Also write a main method for each class in which that class is tested – create…Object Oriented Programming in JAVA You are part of a team writing classes for the different game objects in a video game. You need to write classes for the two human objects warrior and politician. A warrior has the attributes name (of type String) and speed (of type int). Speed is a measure of how fast the warrior can run and fight. A politician has the attributes name (of type String) and diplomacy (of type int). Diplomacy is the ability to outwit an adversary without using force. From this description identify a superclass as well as two subclasses. Each of these three classes need to have a default constructor, a constructor with parameters for all the instance variables in that class (as well as any instance variables inherited from a superclass) accessor (get) and mutator (set) methods for all instance variables and a toString method. The toString method needs to return a string representation of the object. Also write a main method for each class in which that class is…Library 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.
- A Door Class A computer game usually has many different objects that can be seen and manipulated. One typical object is a door. Whether a player runs through a castle, attacks the forces of an evil empire, or places furniture in a room, a door often comes into play. Implement a Door class as described below as well as a TestDoor class that instantiates three Door objects labeled “Enter,” “Exit,” and “Treasure.” The “Enter” door should be left unlocked and opened. The “Exit” door should be left closed and locked. The “Treasure” door should be left open but locked. A Door class A Door object can • display an inscription, • be either open or closed, and • be either locked or unlocked. Here are some rules about how Door’s work. • Once the writing on a Door is set, it cannot be changed. • You may open a Door if and only if it is unlocked and closed. • You may close a Door if and only if it is open. • You may lock a Door if and only if it is unlocked, and unlock a Door if…True or False A class can implement more than one interface.java programming Robot Class : a robot has a name , located at a point with integer coordinates , faces north , east , south , or west and keeps a record of all its movements positions . The class has the following methods : A default constructor that initializes robot's name to " Unknown ” , location to ( 0,0 ) , direction to North , and travelled distance to 0 , and simulated movements to null . A constructor that given robot's name , starting location , and facing direction , Accessor methods to access all the instance variables and the simulated movements of the robot Mutator methods that change the instance variables to given values and they made the change for only suitable values . tumLeft and turn Right methods that change the direction of the robot but not the location move method that moves the robot by one unit in the direction it is facing . get Travelled Distance method that retums how many units has the robot moved .
- java languageCreate a class with following attributes: The car's make The car's model The car's year Now let's identify the class's methods. Specifically, the actions are: Constructor of Car class Set and get the car's make Set and get the car's model Set and get the car's year Now create few instance of the Car in a Test class. Use getter and setter to set the instance variables. Create a class with following attributes: The car's make The car's model The car's year Now let's identify the class's methods. Specifically, the actions are: Constructor of Car class Set and get the car's make Set and get the car's model Set and get the car's year Now create few instance of the Car in a Test class. Use getter and setter to set the instance variables.True or False An interface can be used to define a set of methods that a class must implement.Which import statement should be included in the source code of a class so that the Math class is explicitly imported? Choose from the given choices. *
- In Java programming (Lesson: Objects, Classes, and Constructors) Every class has a constructor and if we do not explicitly write a constructor for a class, the java compiler builds a default constructor for that class. False or True Please provide an explanation for the answer. Thank you!In java language on netbeans design a console application that will print the game sales for a particular game in 2021. Use an abstract class named Games that contains variables to store the game name, game genre and the total sales. Create a constructor that accepts the game name, game genre and the total game sales as parameters. In this class also create get methods for the variables. The Games class must implement an iGames interface that contains the following: public interface iGames { public void printSales(); public String getGame(); public String getGameGenre(); public int getGameSales(); } Create a subclass called Game Sales that extends the Games class. The Games Sales class must contain a constructor to accept the game name, game genre and total game sales as parameters. Then, write code for the Print Sales method, which prints the game sales report for 2021. Finally, write a Use Games class to instantiate the Games Sales class.in C# languageDesign a Book class that holds the title, author’s name, and price of the book. Books’s constructor shouldinitialize all of these data members except the price which is set to 500/-. Create a display method thatdisplays all fields.All Books are priced at 500/- unless they are PopularBooks. The PopularBooks subclass replaces theBookprice and sets each Book’s price to 50,000/- through PopularBooks construcor. Override the displaymethod to display all fields.Write a Main () method that declares an array of five Book objects. Ask the user to enter the title andauthor for each of the 5 Books. Consider the Book to be a PopularBook if the author is one of the following:Khaled Hosseini, Oscar Wilde, or Rembrandt. Display the five Books’ details.