Write a class named Marsupial that can be used as shown below: >>> m=Marsupial ("red") >>> m.put_in_pouch ('doll') >>> m.put_in_pouch >>> m.put_in_pouch ('kitten') >>> m.pouch_contents() ['doll', 'firetruck', 'kitten'] >>> print (m) I am a red Marsupial. ('firetruck')
Q: Describe the kernel of a typical operating system in one sentence.
A: Question: Describe the kernel of a typical operating system in one sentence. Solution in step 2.
Q: Can the kernel components of a standard operating system be summed up in a single sentence?
A: The kernel is the primary processing unit of an operating system (OS) on a computer. As the heart…
Q: What distinguishes a database from a repository?
A: In this question we need explain the difference between repository and database.
Q: How can I get access to Application Software? The most effective technique to convey your point is…
A: Introduction: Application software is made to assist with a wide range of functions, including…
Q: Construct a standard Turing machine that accepts the set of palin- dromes over {a,b}.
A:
Q: What advantages do both vertical and horizontal partitioning offer
A: Introduction: I won't go into the general benefits of partitioning since they can be discovered…
Q: Would you mind defining and explaining cloud scalability? What elements influence the cloud's…
A: Answer is
Q: An ethical hacker makes multiple guesses at the admin password for a local school's web-server but…
A: Below I have provided the solution of the given question:
Q: Do you know what makes up the kernel of a typical operating system?
A: A PC software called a Kernel serves as the brains and nerve centre of an operating system, which…
Q: The system's method for detecting incursions
A: An internal network is protected against unauthorised servers and networks using a firewall based on…
Q: The Windows operating system has elements called executive modules that are designed to carry out…
A: Introduction: The executive modules of the Windows operating system—also known as Windows NT…
Q: Data transformation may range from something as simple as a change in the format or representation…
A: Introduction: In a typical data integration scenario, the client queries the master server for…
Q: Use the two well-known methods listed below to create IP models. What is the most efficient…
A: Answer The two well-known methods listed below to create IP models are as follows:
Q: Given the following function: int Rec(int n) { } if (n == 0) else return 0; return Rec(n-1) +…
A: we have: int Rec(int n) { if(n==0) return 0; else return Rec(n-1) + (3*n-2);…
Q: Why is installing RISC CPUs easier than installing CISC CPUs?
A: The Answer is :-
Q: What is the operation of the intrusion detection system?
A: In this question we need to explain the operation (working) of Intrusion Detection System (IDS).
Q: Define a class named Movie. Include private fields for the title, year, and name of the director.…
A: Below I have provided a C++ program for the given question. Also, I have attached a screenshot of…
Q: At least three of the most popular sensor types used in the Internet of Things should be included…
A: List of sensors found in Internet of Things devices: Infrared cameraTemperature gaugeVisual…
Q: Explain why deep access is preferable to shallow access from the standpoint of a programmer; do not…
A: Programming languages which use dynamic identification for free variables ( i.e., non local…
Q: What are the advantages and disadvantages of using a service like Gmail for email? improving and…
A: Introduction In this question, we are asked What are the advantages and disadvantages of using a…
Q: ndful of Linux's characteristics in your own words. Is it essential to discuss these qualities in…
A: Introduction:Like Windows and Mac OS X, Linux is an operating system. Operating systems are pieces…
Q: Do Windows Services really exist, and if so, how do they work? Is creating a Windows Service…
A: Introduction:Services are a crucial component of the Microsoft Windows operating system that enable…
Q: Use the two well-known methods listed below to create IP models. What is the most efficient…
A: The Open Systems Interconnection (OSI) model's fifth (Session), sixth (Presentation), and seventh…
Q: B: Write a complete C++ program that read information of 10 students (student Struct contain :name…
A: The complete answer below is solved using C++ programming language:
Q: What are the various logical levels to take into account while creating a distributed client-server…
A: Distributed client-server architecture - It it the task is divide between client and server. Server…
Q: Explain in detail how this concert fits into an organization and why the top-down approach is better…
A: Introduction: The top-down technique picks sectors and industries to balance a portfolio. The…
Q: Why are mouse push events different from mouse click events?
A: What sets apart a mouse push from a mouse click is primarily: As the name suggests, a mouse press…
Q: Can you explain how view supports data security and why view for data shouldn't be totally relied…
A: Here is the detailed explanation, kindly look into it.
Q: Think about the distinction between slotted and pure ALOHA under light loads. Which one is the…
A: Pure ALOHA: The data are always being transferred in pure ALOHA format. When there is just a little…
Q: In what respects is programming an object-oriented language? Additionally, it is vital to examine…
A: Additionally, OOPS's characteristics must be described. A primary component of object-oriented…
Q: Why are business rules necessary for data modeling in the first place, and what purpose do they…
A: Introduction: The database architecture must take business rules into account while identifying and…
Q: What are Windows Services, and how do they work?
A: Introduction: Services, which are an essential component of the Microsoft Windows operating system,…
Q: Clarifying firewalls' function in network security and protection is crucial. Don't forget to make…
A: the value of a firewallLet's start by asking, "Why firewall?"I have a computer, and it works well.…
Q: Renata has a desktop computer that is four years old, has a Core 2 Duo processor, and has two…
A: eSATA basically stands for external SATA. First Check whether your motherboard has port for eSATA.…
Q: What options are there in computer science for maintaining data integrity?
A: Introduction: The data developer must include aspects that improve the data's correctness and…
Q: Will you, as an IT manager, assign new systems analysts maintenance tasks? Why do you feel that way?
A: Project levelling and allocation are essential elements of project management. The terms "resource…
Q: Binary search will perform at most ( ) comparisons on an array of 1,024 elements. Group of…
A: out of the given options none is correct the correct answer is 11.
Q: A Digital Certificate is a computer file that contains a set of information regarding the entity to…
A: Option B is correct: Only statements I, II and IV are correct
Q: What does "predictive analysis" mean? Give a use example for this.
A: Numerous companies use predictive analytics, an important analytical technique, to evaluate risk,…
Q: Can the word "intrusion prevention system" be defined?
A: THE INTRODUCTION TO THE Intrusion Prevention System (IPS): An intrusion prevention system, sometimes…
Q: Given an integer value N, write a program to print a diamond pattern of 2*N rows as shown below.…
A: I give the code in Python along with output and code screenshot(because no particular language is…
Q: What does "predictive analysis" mean? Give a use example f
A: Predictive analytics is the use of data to predict future trends and events. It uses historical data…
Q: What steps are being taken to lessen the noise in network traffic?
A: introduction: To begin with, we must comprehend what network traffic is, or what the noise in the…
Q: Class Activity: What is a process model in Software Engineering? Give examples of different process…
A: A process model is a representation of a process within a software system. It can be used to…
Q: Do any data structure components need to be recognized all the way up at the database layer?
A: Data Hierarchy is the systematic arranging of data, according to the query. Characters, fields,…
Q: What make up a typical operating system's kernel components and how are they used?
A: Typical OS kernel components:- I/O Manager Cache Manager Object Manager Power Manager Virtual…
Q: What command produces an exhaustive list of all the files and their permissions in the current…
A: Introduction: A directory listing is shown with the ls command. "ls" alone shows every file in the…
Q: It is important to recognize and quickly describe the many information systems-related problems that…
A: Global information systems are the ones that many nations throughout the world have embraced. global…
Q: Can the word "intrusion prevention system" be defined?
A: An intrusion prevention system (IPS) is a network security tool that continuously scans a network…
Q: There are, by hypothesis, infinite number bases, but in computing we use hexadecimal, octal and…
A: The conversion of hexadecimal to decimal is done by using the base number 16. The hexadecimal digit…
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:
Step by step
Solved in 3 steps with 1 images
- Parking Ticket SimulatorFor this assignment you will design a set of classes that work together to simulate apolice officer issuing a parking ticket. The classes you should design are:• The Parkedcar Class: This class should simulate a parked car. The class's respon-sibilities are:To know the car's make, model, color, license number, and the number of min-utes that the car has been parkedThe BarkingMeter Class: This class should simulate a parking meter. The class'sonly responsibility is:- To know the number of minutes of parking time that has been purchased• The ParkingTicket Class: This class should simulate a parking ticket. The class'sresponsibilities areTo report the make, model, color, and license number of the illegally parked carTo report the amount of the fine, which is $2S for the first hour or part of anhour that the car is illegally parked, plus $10 for every additional hour or part ofan hour that the car is illegally parkedTo report the name and badge number of the police…T/F: Instance variables are shared by all the instances of the class. T/F: The scope of instance and static variables is the entire class. They can be declared anywhere inside a class. T/F: To declare static variables, constants, and methods, use the static modifier.class GradedActivity { private: double score; public: GradedActivity() { score = 0.0; } GradedActivity(double s) { score = s; } void setScore(double s) { score = s; } double getScore() { return score; } char getLetterGrade() const; }; Implement the GradedActivity class above. In this C++ assignment, create a new class Assignment which is derived from GradedActivity. It should have three private member ints for 3 different parts of an assignment score: functionality (max 50 points), efficiency (max 25 points), and style (max 25 points). Create member function set() in Assignment which takes three parameter ints and sets the member variables. It should also set its score member, which is inherited from GradedActivity, using the setScore() function, to functionality + efficiency + style. Signature: void Assignment::set(int, int, int) Create a main program which instantiates an Assignment, asks the user…
- class Player { protected: string name; double weight; double height; public: Player(string n, double w, double h) { name = n; weight = w; height = h; } string getName() const { return name; } virtual void printStats() const = 0; }; class BasketballPlayer : public Player { private: int fieldgoals; int attempts; public: BasketballPlayer(string n, double w, double h, int fg, int a) : Player(n, w, h) { fieldgoals = fg; attempts = a; } void printStats() const { cout << name << endl; cout << "Weight: " << weight; cout << " Height: " << height << endl; cout << "FG: " << fieldgoals; cout << " attempts: " << attempts; cout << " Pct: " << (double) fieldgoals / attempts << endl; } }; a. What does = 0 after function printStats() do? b. Would the following line in main() compile: Player p; -- why or why not? c. Could…Parent Class: Food Write a parent class called Food. A food is described by a name, the number of grams of sugar (as a whole number), and the number of grams of sodium (as a whole number). Core Class Components For the Food class, write: the complete class header the instance data variables a constructor that sets the instance data variables based on parameters getters and setters; use validity checking on the parameters where appropriate a toString method that returns a text representation of a Food object that includes all three characteristics of the food Class-Specific Method Write a method that calculates what percent of the daily recommended amount of sugar is contained in a food. The daily recommended amount might change, so the method takes in the daily allowance and then calculates the percentage. For example, let's say a food had 6 grams of sugar. If the daily allowance was 24 grams, the percent would be 0.25. For that same food, if the daily allowance was 36 grams, the…Using classes, design an online address book to keep track of the names, addresses, phone numbers, and dates of birth of family members, close friends, and certain business associates. Your program should be able to handle a maximum of 500 entries. Define a class addressType that can store a street address, city, state, and ZIP code. Use the appropriate functions to print and store the address. Also, use constructors to automatically initialize the member variables. Define a class extPersonType using the class personType (as defined in Example 10-10, Chapter 10), the class dateType (as designed in this chapters Programming Exercise 2), and the class addressType. Add a member variable to this class to classify the person as a family member, friend, or business associate. Also, add a member variable to store the phone number. Add (or override) the functions to print and store the appropriate information. Use constructors to automatically initialize the member variables. Define the class addressBookType using the previously defined classes. An object of the type addressBookType should be able to process a maximum of 500 entries. The program should perform the following operations: Load the data into the address book from a disk. Sort the address book by last name. Search for a person by last name. Print the address, phone number, and date of birth (if it exists) of a given person. Print the names of the people whose birthdays are in a given month. Print the names of all the people between two last names. Depending on the users request, print the names of all family members, friends, or business associates.
- Child Class: Vegetable Write a child class called Vegetable. A vegetable is described by a name, the number of grams of sugar (as a whole number), the number of grams of sodium (as a whole number), and whether or not the vegetable is a starch. Core Class Components For the Vegetable class, write: the complete class header the instance data variables a constructor that sets the instance data variables based on parameters getters and setters; use instance data variables where appropriate a toString method that returns a text representation of a Vegetable object that includes all four characteristics of the vegetableJavaC++ code: Suppose you are creating a fantasy role-playing game. In this game we have four different types of Creatures: Humans, Cyberdemons, Balrogs, and elves. To represent one of these Creatures we might define a Creature class as follows: class Creature { private: int type; // 0 Human, 1 Cyberdemon, 2 Balrog, 3 elf int strength; // how much damage this Creature inflicts int hitpoints; // how much damage this Creature can sustain string getSpecies() const; // returns the type of the species public: Creature(); // initialize to Human, 10 strength, 10 hitpoints Creature(int newType, int newStrength, int newHitpoints); int getDamage() const; // returns the amount of damage this Creature // inflicts in one round of combat // also include appropriate accessors and mutators }; Here is an implementation of the…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…
- In Python Programming Language : Design an Employee class that has fields for the following pieces of information : Employee name Employee number Design a class named ProductionWorker that extends the employee class. The production worker class should have fields to hold the following information: Shift number (an integer such as 1,2,3) Hourly pay rate The workday is divided into 2 shifts day and night. The shift will hold an integer value that the representing the shift that the employee works. The day shift is shift 1 and the night shift is shift 2. Design the appropriate accessor and getter methods for each class. Once you have designed the classes, design a program that creates an object of the production worker class and prompts the user to enter data for each object’s fields. Store the data in the object and then use the object’s accessor methods to retrieve it and display it on the screen.Programming Language = Python 1. Employee and ProductionWorker Classes Write an Employee class that keeps data attributes for the following pieces of information: • Employee name • Employee number Next, write a class named ProductionWorker that is a subclass of the Employee class. The ProductionWorker class should keep data attributes for the following information: • Shift number (an integer, such as 1, 2, or 3) • Hourly pay rate The workday is divided into two shifts: day and night. The shift attribute will hold an integer value representing the shift that the employee works. The day shift is shift 1 and the night shift is shift 2. Write the appropriate accessor and mutator methods for each class. Once you have written the classes, write a program that creates an object of the ProductionWorker class and prompts the user to enter data for each of the object’s data attributes. Store the data in the object and then use the object’s accessor methods to retrieve it and display it on the…NewspaperSubscriber class- create an abstract class named NewspaperSubscriber with attributes to contain the subscriber’s street address and the subscription rate. Include get and set methods for both these attributes. The set method for the rate is abstract. The setAddress method must prompt the user to enter the subscriber’s address through the use of a dialog box. Create a constructor for the base class. Create a toString() method that concaternates and returns the subscriber’s street address and rate for display. Create 3 child classes named SevenDaySubscriber, Weekday Subscriber, and Weekend Subscriber. Each child class has an additional attribute called subType, which is a String, that will store the type of newspaper subscription. Create a setType method that will set the type of subscriber as follows: “Seven Day”, “Weekday”, or“Weekend”. Create a setRate method for each child class that sets the rate as follows: a SevenDaysubscriber pays R18.00 per week for his newspapers, a…