You must modify the class Owner provided below, so that objects of this class can hold objects of both classes Dog and Cat in their array. Note you must also modify the methods add and getPet accordingly.
Q: What are the guidelines for developing a user-defined identifier?
A: The definition of an identification: Identification is also a component of programming. This phrase ...
Q: Give a synopsis of the security services.
A: Intro As the number of potential threats increases, the number of ways to protect your data and netw...
Q: Computer Science code in c++ please .Do NOT use ANY string/character manipulation or arithmeti...
A: Given The answer is given below.
Q: Why is it important to have protocols in data communication? Site an example of a problem that may o...
A: In information technology, a protocol is the special set of rules that end points in a telecommunica...
Q: The two types of memory chips, RAM and ROM, are both made with information already stored in them wh...
A: Answer: False
Q: What are the difficulties and issues raised by the use of non-integrated information systems?
A: Given :- What are the difficulties and issues raised by the use of non-integrated information system...
Q: Explain CSMA/CD protocol and how does it detect collision. ?
A: The Answer is in Below Steps
Q: Discuss how microprocessors have evolved in terms of performance and speed.
A: Introduction: The microprocessor is a necessary component in many gadgets. Microprocessor manufactur...
Q: What is the average seek time of a driver?
A: Categorization: The Best Driver Updater for Windows | The Top 10 To carry out its intended tasks, a ...
Q: Which Windows programme should you use to remove an expansion card?
A: Introduction: There are other methods for removing applications and programmes, so if you can't loca...
Q: Describe several applications of virtual reality in product design.
A: The term, “virtual reality” means an artificial environment that can be interacted with by humans us...
Q: waterfall model ans expalin its advantages and disadvantages? Correct answer will be upvoted
A:
Q: 1. What is the largest 16-bit binary number that can be represented with (a) unsigned numbers? (b) t...
A: I'm providing the both answers. I hope this will be helpful for you.
Q: Discuss physical security, the key physical security risks, and how they emerge in organisational at...
A: Introduction: Physical security addresses the design, perpetration, and conservation of countermeasu...
Q: Project 1: Caesar Cipher Assignment Overview In this assignment, we are going to implement a simple ...
A:
Q: Write a short note on the following CSMA schemes. (a) Non-persistent (b) 1-persistent (c) P-persiste...
A: The Answer is
Q: PP 00 01 01 11 1o
A: the K-map interpretation of this below:-
Q: Design DFA for the following over {a,b} (i) All strings containing not more than three a's.
A: Given: (i)L= All strings containing not more than three a's over {a,b} Logic to Build DFA for L: -si...
Q: In a complex join, how is the number of tables you wish to join related to the number of WHERE condi...
A: According to the information given:- We have to define the complex join in number of table and relat...
Q: Why did Cisco systems make the switch from standalone access control to IP networked access control?
A: Introduction: When you configure a Cisco switch correctly, your network will create connections more...
Q: Please convert to 3rd Normal Form
A: Third Normal Form is a form that is already in First Normal Form as well as Second Normal Form and t...
Q: d the data into a pandas dataframe named data_firstname where first name is you name. 2. Carryout so...
A: Lets see the solution.
Q: Draw a non-deterministic automata to accept strings containing substring 0101. ?
A: The Answer is in below steps
Q: What influence does data mining have on personal security and privacy?
A: Introduction: Data extraction from data sets can be done using privacy-protected data mining (PPDM) ...
Q: Write an if -else statement that assigns True to fever if temperature is greater than 98.6; otherwis...
A: Given requirement, Write an if-else statement that assigns True to fever if the temperature is great...
Q: The temperature alone is not enough to provide the answer. Other factors including wind speed, relat...
A: Following is the answer:
Q: At any given time, how many primary partitions can be active?
A: Introduction: An operating system may be installed on a primary partition. The operating system is ...
Q: 1.) Part A (10): Develop a solution for the Dining Philosopher’s problem using AND-Synchronization (...
A: Given The answer is given below.
Q: Your program needs to read in two words on a single line. If the pair of words are Super Anagrams of...
A: Here, I have to provide a python solution to the above question.
Q: What is the best method for managing cloud migration risk?
A: Introduction: Cloud computing is critical for efficient company operations and data access. Adopting...
Q: Create a class diagram to model the information needs listed in each task. The Human Resource...
A: Solution: Given, The Human Resources (HR) office of a federal government agency keeps track of ...
Q: Design NFA to accept strings with a^ prime s and b's such that the string end with bb.
A: The Answer is in below Steps
Q: What kind of computing do you often undertake on your own computer: batch or interactive? Give insta...
A: Batch: Occupations with similar requirements are grouped together and routed via the PC as a group b...
Q: What is the binary encoding of the following RISC-V assembly instruction? Please write your answer a...
A:
Q: Temperature of the CPU can be checked.
A: Introduction: The central processing unit (CPU) is the fundamental calculating device in computer sc...
Q: 3. Consider the 8-puzzle problem. The start state and end stats are given in the following: (3x15=45...
A: I am attempting the first part. Both parts are lengthy. Kindly find attached the images for the sear...
Q: What Is The Concept Of The Union Of Fa’s ?
A: Introduction: What Is The Concept Of The Union Of Fa’s ?
Q: What are your viewpoints of C Programming?
A: A programming language is used to implement logic so that hardware can complete its job through user...
Q: b) What is the difference between (x++), (x+-), and (--x).
A: We need to describe the given operations.
Q: When a programme executes 500 instructions, each cycle takes 5 seconds, and the clock cycle time is ...
A: what is the CPU time?
Q: What exactly is inverse multiplexing?
A: Introduction: Multiplexing is the technique of providing numerous signals or streams of data across ...
Q: The file deletion method had any effect on the Symbian, Android, and iPhone operating systems.
A: Intro The cellular running gadget Android is constructed on a changed model of the Linux kernel an...
Q: 6. Find the minimized Boolean expression for the function
A: Karnaugh map of the given Boolean table is:
Q: Describe the memory addressing capabilities of the 20-bit address bus.
A: Intro Address bus is used to transfer the address of the memory loacation or I/O device for data tra...
Q: s Netflix supported by Amazon Web Services as a customer relationship management (CRM), enterprise r...
A: answer is
Q: Define End-use application?
A: An application is something that is used to operate a certain thing. The applications vary in types ...
Q: t is the median of the following list of numbers? [11, 20, 8, 2, 7, 3, 19, 16, 1
A: Arrange the data in ascending order( from smaller to the larger number) 2,3,7,8,11,13,16,17,19,20 Th...
Q: When you think about data backup and recovery, what are some of the most important things to think a...
A: Data backup is the duplicate of data that allows us to retrieve our data in the event that all of ou...
Q: Translate the following algoritlim into Java code: Step 1: Declare a lo variable named ir E with ini...
A: Step-1: Declare a double variable named with initial value 100. Step-2: Declare a double constant na...
Q: What is something that you've seen when someone has been presenting a PowerPoint that you find annoy...
A: Introduction: Here we are required mention the mistakes people do while presenting a power point pre...
Step by step
Solved in 4 steps with 1 images
- public class date { private int day; // from 1 to 31 private int month; // from 1 to 12 private int year; // from 2000 upwards public void advance (); // move to next day }; Implement a constructor that initializes new objects of date class to be set to the 1st of January 2000. Implement setters for day, month, and year. Implement the advance method, which moves to the next day, ensuring that all data members are updated appropriately.What is the output of the following code? Convert the abstract class into an interface and modify the codes in all classes that will maintain the same output. (Rewrite the code)public class Father { public String name; public int age; // customer name Father(){ name=”Hassan”; age=50;} public void display(){ System.out.println(“Name:”+name); System.out.println(“Age:”+age); } } 1. Based on Figure 3, create a class named Child that inherits the Father class. Declare an instance name location (String) for class Child. 2. Define a constructor in class Child and give an appropriate initial values for the instance (name, age, location). 3. Define a method display () in class Child, execute the display ( ) method in superclass using the keyword super. Method display ( ) in class Child should print the information of name, age and location 4. Create other class named Main for the main method and create 2 objects for the 2 classes (Father and Child). Then execute the display ( ) method for Father and Child. Example of the output as in Figure 4: Father's info: Name: Josh Age: 50 Child's info: Name: Christy Age: 20 Location:…
- Vehicle is an abstract class. Create the Airplane class as a subclass of Vehicle. Extend and override Airplane as necessary to meet the criteria below. The travel method should return the distance traveled by the Airplane object. CODE: abstract class Vehicle { public abstract double travel(double time);} //add class definitions below this line //add class definitions above this line public class Exercise2 { public static void main(String[] args) { //add code below this line //add code above this line }}public class Cat extends Pet { private String breed; public void setBreed(String userBreed) { breed = userBreed; } public String getBreed() { return breed; }} public class Pet { protected String name; protected int age; public void setName(String userName) { name = userName; } public String getName() { return name; } public void setAge(int userAge) { age = userAge; } public int getAge() { return age; } public void printInfo() { System.out.println("Pet Information: "); System.out.println(" Name: " + name); System.out.println(" Age: " + age); } } import java.util.Scanner; public class PetInformation { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); // create a generic Pet and a Cat Pet myPet = new Pet(); Cat myCat = new Cat(); // declare variables for pet and cat info String petName, catName, catBreed; int petAge,…2. Consider the following class definitions: public class BClass } private int x; public void set(int a) } X a; { public void print() } System.out.print(x); { { public class DClass extends BClass } private int y; public void set(int a, int b) } //Postcondition: x =a; y=Db; { public void print( ) {.…} a. Write the definition of the print method of DClass that overrides it. b. Write the definition of the method set of the class DClass.
- The Temperature class is an abstract class with two abstract methods. Create the Conversion class which inherits from Temperature. Use the formulas below to help with the temperature conversions. CODE: abstract class Temperature { public abstract double celsius(double temp); public abstract double fahrenheit(double temp);} //add class definitions below this line //add class definitions above this line public class Exercise3 { public static void main(String[] args) { //add code below this line Conversion c = new Conversion(); //add code above this line }}class Time { private int hour; private int minute; private int second; public Time( ) { } public Time(int hr , int min, int sec) { } public void setTime(int hr , int min, int sec) { } public void printTime( ) { } public void tick( ) { // tick method defined } } The class Time defines a time object. It represents time (military time) in 2400 hours. 10 AM = 10 hours, 0 minutes and 0 seconds 4 PM = 16 hours, 0 minutes and 0 seconds 7:26PM = 19 hours, 26 miunutes and 0 seconds Assume 0 represents 00 in this case. 1) Implement the two constructor: Time(): will set the instance variables to zero. Time(int hr , int min, int sec): will set the time with parameters passed in. 2) Implement the setTime method to set the instance variables according to the values passed in. 3) Implement the printTime method to print time in hours:minutes:seconds e.g.…8. OOPS Theory #6 public class Car { public void horn() { System.out.println("Horn horn"); } } public class Ferrari extends Car { public void horn() { System.out.println("Ferarriiiiii"); } } public static void main(String[] args) { Ferrari ferrari = new Car(); ferrari.horn(); } Pick ONE option Horn horn Ferarriiii Cannot compile Runtime exception Clear Selection 9. OOPS Theory #7 In Java, we can achieve the abstraction by creating the blueprint of an object and only have abstract methods. What do we call this? Pick ONE option Interface Encapsulation Instance Protected Clear Selection
- public class Animal { public void makeNoise() { System.out.println("talk"); }//end method makeNoise }//end class Animal public class Dog extends Animal { public void makeNoise() { System.out.println("Bark"); }/lend method makeNoise }//end class Dog What would the output of the following be? Explain your answer. Animal animal = new Animal(); animal.makeNoise(); Dog dog = new Dog(); dog.makeNoise(); Animal animaldog = new Dog(); animaldog.makeNoise();Code: interface Bicycle{ //interface for bicycle void changeGear(int val); //abstract methods void changeSpeed(int inc); void applyBrakes(int dec); void ringBell(int count); } class NewCycle implements Bicycle{ //class for a new cycle int speed=0; //stores the speed value int gear=0; //stores the gear value @Override public void changeGear(int val) { //method to change the gear gear=val; } @Override public void changeSpeed(int inc) { //method to change the speed speed=speed+inc; } @Override public void applyBrakes(int dec) { //method to apply brakes speed=speed-dec; } @Override public void ringBell(int count) { //method to ring the bell for(int i=0;i<count;i++){ System.out.print("Clang!!"+" "); } System.out.println(""); } public void printState(){ //method to print the states System.out.println("Ring bell, Speed, Gear,…Create a subclass named Square from the superclass Geometricobject. Create an instance variable named width with initial value 0. Create a no-arg constructor. Create the another constructor, which has one parameter named wid. ASsign the wid to the instance variable named width. Create the getWidth() method, the setWidth() method. Override the getArea() method. Override the getPerimeter() method. Create a test class named Test to create an instance with wid= 6 from Square class. Call the getArea() and getPermeter() methods to print out the area and perimeter of the square with width=6.