Design a class named Fan to represent a fan. The class contains: a. An int data field named speed that specifies the speed of the fan. A fan has speeds indicated with a value 1, 2, or 3. b. A bool data field named on that specifies whether the fan is on. c. A double data field named radius that specifies the radius of the fan. d. A no-arg constructor that creates a default fan with speed 1, on false, and radius 5. e. The accessor and mutator functions for all the data fields.
Q: Explain both the benefits and the drawbacks of using pre-made software packages rather than…
A: Explanation: The benefits and drawbacks of employing software packages rather than designing…
Q: Compare the mobile and cloud connectivity. How may mobile devices benefit from cloud computing?
A: Introduction: Mobile computing empowers us to get to information and data through a mobile gadget,…
Q: I need assistance converting the following code to a Hack assembly code
A: The Hack computer has a text-based assembly language to create programs for the hardware platform…
Q: Is it feasible to encrypt both the data and the connection from beginning to end? What are the…
A: All data on both sides of a communication connection is encrypted and decrypted using link…
Q: Find out the advantages and disadvantages of the network environment that is currently in use.
A: Determine the existing network environment's advantages and disadvantages.
Q: What difficulties are there in implementing networking throughout a whole organisation? Please…
A: One definition of networking is "goal-directed behavior that occurs both inside and outside of an…
Q: Take into consideration the following scenario: you are hired by company "x" and are working on a…
A: Given: Non-repudiation ensures that no one may question the validity of anything. Non-repudiation…
Q: What is the difference between TCP and UDP when it comes to networking? Compare and contrast these…
A: TCP is a connection-orientated protocol, whereas UDP is a connectionless protocol. A key distinction…
Q: What is the differences/similarities between FOR, WHILE and DO Loop.
A: HI THEREI AM ADDING ANSWER BELOWPLEASE GO THROUGH ITTHANK YOU
Q: What are the advantages that virtual private networks (VLANs) provide to an organization's business…
A: Introduction: Employ private Virtual Local Area Networks to isolate a user from the rest of the…
Q: Is it possible to successfully combat cybercrime in the world? How? Elaborate. Give examples of…
A: Cyber fraud can be defined as a fraudulent activity that is performed over the internet. The primary…
Q: Two alternative methods are used to terminate processes and break deadlocks.
A: Two methods break a Deadlock: To end the impasse, kill one or more processes. Preemption: To avoid…
Q: What kind of memory does the computer have, and how can you describe it?
A: Given: Provided: The background of the subject we must consider is given to us. The goal is to talk…
Q: What is the operating system's role in the management of the system's hardware?
A: Given: There is only room for one process to be active at any one time. Because central processing…
Q: Provide a condensed explanation of how Wavelength Division Multiplexing works.
A: Wavelength Division Multiplexing(WDM) works as following: In this technique, there is a multiplexer…
Q: * used for declaration for all forms global O dim O form O
A: Hey, the answer is given below.
Q: 3) Locate three sites on the internet that deal with web security. Use whatever means you want and…
A: 1) Dark ReadingDark Reading is packed with information for a growing information security community.…
Q: Identify some of the issues involved in constructing an infrastructure for an information system to…
A: Given: Identify some of the issues involved in constructing an infrastructure for an information…
Q: Learn everything you can about social networking. What is autonomic computing and how does it help…
A: According to the information given:-We have to define the social networking and autonomic computing…
Q: When dealing with the administration of multiprogramming, multiprocessing, and distributed computing…
A: Concurrency: Concurrency is a technique for interleaving actions in time to provide the appearance…
Q: In order to investigate and solve problems, every professional has to have access to the appropriate…
A: Given: Operating system technicians are in charge of installing, configuring, and maintaining…
Q: When you think about email, what images spring to mind? What path does an email take once it is…
A: Introduction: It's a means for sending electronic communications via the internet. It's a…
Q: Many of the motherboard's components are linked via parallel lines of electrical conductivity. Are…
A: Given: Parallel lines of electricity link the various components of a PC processing unit. Buses are…
Q: he advantages of floating point number over intege
A: A floating point number, is a positive or negative whole number with a decimal point. For example,…
Q: C. Video class inherits the class Disk. It has as attributes two Strings director and description.…
A: Given :
Q: How many of a computer's internal and exterior components receive their electricity directly from…
A: Definition: For the internal components of a computer, a power supply unit (PSU) transforms mains AC…
Q: In order to investigate and solve problems, every professional has to have access to the appropriate…
A: Introduction: There is still no perfect operating system. Every system has its own set of…
Q: Use social networking blogs and cloud computing to your advantage.
A: Cloud computing is a network of servers connected using the Internet. Its main function is to share…
Q: It is possible for a computer system to generate and process information in a variety of distinct…
A: Introduction: Similar to people, computers use their brains to process information. The central…
Q: Deduce X from the following, (i) (BA0.C),6 = (X)g (ii) (10101100)₂ = (X) 16 2 (iii) (FFE.C)₁ = (X) ₂…
A: The Answer is in Below Steps
Q: The individual components of a high-level programming language are identified by their names.
A: Start: Input refers to the process of providing the computer with data and instructions. output…
Q: What component of hardware is responsible for a device's ability to connect to the Internet?
A: What component of hardware enables a device's physical network connection? Solution: In the network,…
Q: What are the best practises of the extranet that apply to the intranet? What role does extranet play…
A: INTRANET: An intranet is described as an organization's internal private network. The objective is…
Q: Describe the variations in the number of locking techniques implemented between Solaris and Linux.…
A: Introduction: Describe the variations in the number of locking techniques implemented between…
Q: An analysis of the benefits and drawbacks associated with purchasing pre-made software rather than…
A: Advantages: Because the project is built for the mass market to meet the common criteria of many…
Q: When mapping generalisations and specialisations in enhanced entity relationship diagrams, which…
A: Enhanced entity relationship diagram is a graphical portrayal that portrays connections among…
Q: t by the phrase "virtual machine se
A: Introduction: Below the phrase "virtual machine security."
Q: Talk about frequency multiplexing as well as time division multiplexing (According to commuter…
A: Multiplexing is the sharing of a medium or bandwidth. It is the process in which multiple signals…
Q: Please enumerate the many ways in which TCP and UDP vary from one another.
A: TCP:It is a connection-oriented networking protocol that enables the exchange of messages between…
Q: Then then, why should anybody bother encrypting their data anyway?
A: Find the required answer given as below :
Q: The question is, under what circumstances is preventing deadlock less costly than allowing deadlocks…
A: Avoiding a stalemate A stalemate occurs when two tasks are waiting to be completed one after the…
Q: The individual components of a high-level programming language are identified by their names.
A: Solution: A high-level language (HLL) is a programming language like C, FORTRAN, or Pascal that…
Q: If you are using Windows 8 to play games on a gaming computer that already has built-in video and an…
A: Introduction: To guarantee that your gaming PC will meet your needs, you must build it yourself from…
Q: Master social media. How can autonomic computing improve cloud computing? Blogging is an example of…
A: The autonomic registering drive, which was created by IBM, exhibits and promoters organizing PC…
Q: You must write the proper program or pseudocode. You must provide also proper data type declaration…
A: According to the information given:- We have to follow the instruction to implement the withdrawal…
Q: What exactly do you mean when you talk about "network security," and how would you express it to…
A: The safety of a network "Network security" encompasses various technologies, equipment, and…
Q: Reflect on IBM's strategy in entering the PC market, VHS' entry into the video game market and…
A: While IBM were selling products like Automatic Sequence Controlled Calculator and type-writers for…
Q: hat does fine-grained multithreading mean
A: What does fine-grained multithreading mean?
Q: which is faster, static routes or dynamic routes? elaborate
A: Static Routing is faster than dynamic routing In static routing, the path between the routers are…
Q: By taking this course, not only will you improve your knowledge of social networking blogs, but also…
A: The social networking blog is the process of writing in a place where readers already existed.…
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:
in c++
Step by step
Solved in 3 steps with 2 images
- Write a class named Car that has the following member variables: yearModel: An int that holds the car’s year model. name: A string that holds the name of the car. company: A string that holds the company of the car. speed: An int that holds the car’s current speed. In addition, the class should have the following member functions. Mutator: Appropriate accessor functions to set the values of object’s yearModel, name, company, and speed member variables. Accessor: Appropriate accessor functions to get the values stored in an object’s yearModel, company, and speed member variables. Accelerate: The accelerate function should add 5 to the speed member variable each time it is called. Brake: The brake function should subtract 5 from the speed member variable each time it is called. Demonstrate the class in a program that creates a Car object, call the setter functions to set the values and then call the accelerate function five times. After each call to the accelerate function, get…Design a class named Fan to represent a fan. The class contains:Three constants named SLOW, MEDIUM, and FAST with the values 1, 2, and 3 todenote the fan speed. An int data field named speed that specifies the speed of the fan (the efault is SLOW). A boolean data field named on that specifies whether the fan is on (the default is false). A double data field named radius that specifies the radius of the fan (the default is 5). A string data field named color that specifies the color of the fan (the default is blue). The accessor and mutator methods for all four data fields. A no-arg constructor that creates a default fan. A method named toString() that returns a string description for the fan. If the fan is on,the method returns the fan speed, color, and radius in one combined string. If the fan isnot on, the method returns the fan color and radius along with the string “fan is off” inone combined string.Write a test program that creates two Fan objects. Assign maximum speed,…2. Car Class Write a class named car that has the following fields: ▪ yearModel. The year Model field is an int that holds the car's year model. ▪ make. The make field is a String object that holds the make of the car, such as "Ford", "Chevrolet", "Honda", etc. ▪ speed. The speed field is an int that holds the car's current speed. In addition, the class should have the following methods. ■ Constructor. The constructor should accept the car's year model and make as arguments. These values should be assigned to the object's year Model and make fields. The constructor should also assign 0 to the speed field.
- Design a Ship class that has the following members:a. A field for the name of the ship (a string).b. A field for the year that the ship was built (a string).c. A constructor and appropriate accessors and mutators.d. A toString method that displays the ship's name and the year it was built.Design a CruiseShip class that extends the Ship class. The CruiseShip class should have the following members:a. A field for the maximum number of passengers (an int).b. A constructor and appropriate accessors and mutators.c. A toString method that overrides the toString method in the base class. The CruiseShip class's toString method should display only the ship's name and the maximumnumber of passengers.Design a CargoShip class that extends the Ship class. The CargoShip class should have the following members:a. A field for the cargo capacity in tonnage (an int).b. A constructor and appropriate accessors and mutators.c. A toString method that overrides the toString method in the base class. The…In Javascript, Pet Class: Design a class named Pet, which should have the following fields and methods: name: The name of a pet type: The type of animal the pet is ("Dog", "Cat", "Lizard", etc.) age: The age of the pet. setName: The setter for the name field. getName: The getter for the name field. setType: The setter for the type field. getType: The getter for the type field. setAge: The setter for the age field. getAge: The getter for the age field. Once you have designed the class, create an instance of the class and use the setter and getter methods to store data in the object and display the data.Static & Not Final Field: Accessed by every object, Changing Non-Static & Final Field: Accessed by object itself, Non-Changing Static & Final: Accessed by every object, Non-Changing Non-Static & Not Final Field: Accessed by object itself, ChangingRead the following situation and decide how the variables should be defined. You have a class named HeartsPlayerA round of Hearts starts with every player having 13 cardsPlayers then choose 3 cards to “trade” with a player (1st you pass left, 2nd you pass right, 3rd you pass across, 4th you keep)Players then strategically play cards in order to have the lowest scoreAt the end of the round, points are cumulatively totaled for each player.If one player’s total is greater than 100, the game ends and the player with the lowest score wins. 1. How should the following data fields be defined (with respect to final and static)?(a) playerPosition (These have values of North, South, East, or West)(b) directionOfPassing(c) totalScore…
- Write a class named Aircraft that has the following member variables: xear - An variable that holds the aircraft's model year. make - A string object that holds the make of the aircraft Qwuer: A string object that holds the type of owner of the aircraft. speed - An int that holds the aircraft's current speed. altitude, An int that holds the aircraft's current altitude. engine type- a String value to hold the type of the engine the aircraft has In addition, the class should have the following member functions. Constructor - The constructor should accept the aircraft's owner and make arguments and assign these values to the object's owner and make member variables. The constructor should initialize the speed variable to 0 and the altitude variable to 0. Accessors - Appropriate accessor functions should be created to allow values to be retrieved from an object's year, make, owner, altitude, and speed member variables. Mutator - Appropriate mutator function should be created to allow the…Mick’s Wicks makes candles in various sizes. Create a class for the business named Candle that contains the following data fields: color - of type String height - of type int price - of type double Create get methods for all three fields. Create set methods for color and height, but not for price. Instead, when height is set, determine the price as $2 per inch. Create a child class named ScentedCandle that contains an additional data field named scent (of type String) and methods to get and set it. In the child class, override the parent’s setHeight() method to set the price of a ScentedCandle object at $3 per inch.Class Student __init__(self, id: int, fist_name: str, last_name: str, town:str): """ This creates a student object with the specified ID first and last name and home town. This constructor should also create data structure for holding the students grades for all of there assignments. Additionally it should create a variable that holds the student's energy level which will be a number between 0 and 1. :param id: The student's identifiaction number :param fist_name: The student's first name :param last_name: The student's last name :param town: The student's home town """ get_id(self)->int: """ Returns the ID of the student as specified in the constructor. :return: The student's ID """ get_first_name(self) -> str: """ Returns the first name of the student. :return: The student's first name """ set_first_name(self, name:str): """ Changes the student first name to the specified value of the name parameter. :param name: The value that the first name of the student will equal. """…
- Please Format in a C++ format for Windows Visual Studio 2017 Please Write a class named Student that has the following variables: name - a string that hold the student's name idNumber - an integer that holds the student's id number major - a string that holds the students major The class should have the following constructors: A constructor that accepts the following values as arguments and assigns them to the appropriate member variables: student name, ID number, and major. A constructor that accepts the following values as arguments and assigns them to the appropriate member variables: student name and ID number. The major should be assigned an empty string (" "). A constructor that assigns empty strings (" ") to the name and major member variables and 0 to the idNumber member variable.1- Design a class named Rectangle to represent a Rectangle. The class contains: • three variables integer data field named height, integer data filed named width and integer data filed named length. The default values are 1 for height, length, and width are 1.0 for each of them respectively. • A no-arg constructor that creates a default Rectangle. • A constructor that creates a Rectangle with the specified height, length and width. • A method named getVolume() that returns the volume of this Rectangle. (Volume = height * width * length) %3! 2- Write a test program called Test Rectangle that: • Creates two Rectangle objects: one object with height 11, length 5, and width 7, the other object with height 10, length 2 and width 6 • Display the volume of each Rectangle object.Design a class named Account that contains: • A private int data field named id for the account (default 0). • A private double data field named balance for the account (default 0). • A private double data field named annualInterestRate that stores the current interest rate (default 0). Assume all accounts have the same interest rate. • A private Date data field named dateCreated that stores the date when the account was created. • A no-arg constructor that creates a default account.• A constructor that creates an account with the specified id and initial balance. • The accessor and mutator methods for id, balance, and annualInterestRate. • The accessor method for dateCreated. Page 10 of 8• A method named getMonthlyInterestRate() that returns the monthly interest rate. • A method named withdraw that withdraws a specified amount from the account. • A method named deposit that deposits a specified amount to the account. • Draw the UML diagram for the class. • Implement the class. Write a…