C++ is a programming language that can be used to Make a program that calculates the volume of different containers. Cylinder will be the base class, and its derived classes, also known as child classes or sub-classes, will be constructed. Create a parent class, Cylinder, first. Make a constant for pi, as you'll need it for any containers that aren't square. For the members, use protected. Finally, add a public function to control the volume. V = pi * (r2) * h is the formula.
Q: What is the cheapest firewall you can find?
A: Introduction: A firewall protects the system from unauthorised access.
Q: Using java: Input the row number and display the sum of all numbers in that row. 2 6 8 12 32 54 8 5 ...
A: The first row is indexed by 0 and thus if we input row number n, then we will calculate the sum of e...
Q: A1D6D039776742 2514B829BF486A
A: The checking is done using the codes as, // iostream in C++ is the standard library which implement ...
Q: Please create a program in Java which will include a method that will merge sort an array of strings...
A: The code is given in the below step
Q: Let f : A → B be a 1-1 correspondence. Then If gf = 1a, we have g = f-'. %3D If fh = 1B, we have h =...
A:
Q: Find the product of 34 and 27 using the following methods. Illustrate/write your complete solution 1...
A: here we have given step by step explain the process of finding the product using Chinese and Egyptia...
Q: When learning about computers, what is the most important thing to keep in mind?
A: Introduction: The most crucial aspects of a computer introduction are, Hardware as well as software
Q: What exactly is extensible Markup Language (XML)?
A: Answer: XML stands for Extensible Mark Up Language. It is like HTML and is designed to describe dat...
Q: Given: Language L2 = {w ϵ {a,b}* | w contains substring aab} Construct the DFA representing the g...
A:
Q: Assume you have access to the caches in your department's local DNS servers. Can you provide a metho...
A: Introduction Assume you have access to the caches in your department's local DNS servers. Can you ...
Q: Create a task that takes a series of words and returns the highest score of goals. Each letter of th...
A: Algorithm: Firstly we will take the input form the user or some fix string Then we will run a ragex ...
Q: For the set I of intervals below, find the largest subset S such that no two intervals in S overlap....
A: This question can be answered by using the concepts of sorting. The arrangement of data into an prop...
Q: Can you please help me with the question: Write a program in C
A: Introduction: C is a general-purpose, procedural computer programming language supporting structured...
Q: What issues can be identified in the router layer 2 protocol? Why does an ICMP request work on a PPP...
A: Introduction: The router switches the connect on OSI layer 2, which is the data link layer.
Q: What are the many kinds of access point modes? In what mode would you run it to detect a rogue devic...
A: Introduction: Access points, also known as APs or hotspots, allow adjacent WiFi-equipped stations to...
Q: Describe two processes that all queues must carry out.
A: Intro The queue is an abstract arrangement, somewhat just like Stacks. in contrast to stacks, a queu...
Q: IN PHP Create a function that takes a mathematical expression in prefix notation as a string and eva...
A: In this question we need to create a function that takes a mathematical expression in the argument a...
Q: Is it better to have virtual functions that are statically or dynamically bound?
A: Introduction the question is about Is it better to have virtual functions that are statically or dyn...
Q: What is the "Data Plane" of a Router? What might it possibly be used for?
A: The control plane in router controls how data packets are forwarded. Example: process of creating a ...
Q: 3) Suppose an application program requires 2500H bytes of memory for its code, 2FOH bytes of memory ...
A: Generally any application has following elements code/text , data , stack and heap. Stack a...
Q: What are the distinctions between Direct Memory Access (DMA) and Sequential Memory Access (SMA)?
A: Intro EXPLANATION: Direct memory access is basically the technique in which the hardware component...
Q: Draw an ER Diagram: A suspect steals at least one car and may steal many cars. A car is stolen by on...
A: answer is
Q: Why isn't a return type required for an operator function that performs data type conversion?
A: Intro the above question is about Why isn't a return type is required for an operator function that ...
Q: In terms of digital memory, there are several types to choose from, including hard disk drives (HDD)...
A: There are various sorts of advanced memory accessible, for example, HDD (Hard-disk-drive), RAM (Rand...
Q: Mention the main characteristics of the Go-Bank-N and the Selective Repeat algorithms in this sectio...
A: Sliding window methods such as Go-Back-N and Selective repeat are both used. The transmitter window ...
Q: Is it possible that the development and deployment of new information technologies will have an impa...
A: Introduction: Internet banking: With online banking, users can conduct financial transactions throug...
Q: Use examples to contrast unstructured and structured data. Which type is more common in a commercial...
A: Introduction: A normal business scenario contains a large amount of data. Structured data is widely ...
Q: How does a Java application access a database?
A: In this problem, we will discuss database access from a Java program.
Q: What does the World Wide Web Consortium (W3C) stand for?
A: Intro the above question is about What does the World Wide Web Consortium (W3C) stands for? ...
Q: What are the basic interfaces of Java Collections Framework?
A: Below is the answer to above question. I hope this will be helpful or you...
Q: the following is a method for redefining a data type? union pointer struct typedef
A: the answe is an typedef
Q: Explain why you would wish to use lightweight graphics on certain Web sites while using highly detai...
A: The use of graphics in web pages depending upon the scenario has been explained briefly below
Q: What is the distinction between these two algorithms? 1-You are given a stack of ten cards, each ...
A: Introduction; the question is about the distinction between these two algorithms and here is the sol...
Q: separate data in a spreadsheet after it has been exported to a text file with the.csv extension, wha...
A: It is defined as a comma-separated values file, which allows data to be saved in a tabular format. C...
Q: For a variety of reasons, it is not practical to keep instructions and data in primary memory while ...
A: -two reasons may be 1.because primary memory stores instructions and data of currently executing pro...
Q: TCP is a dependable protocol that guarantees sequence and error correction, but it comes at a cost i...
A: When sending data over a network, we should use one of two methods: TCP [Transmission Control Protoc...
Q: IN PHP Create a function that takes a mathematical expression in prefix notation as a string and eva...
A: Algorithm: firstly take the string form the user or the method argument then evaluate the string an...
Q: Prior to the introduction of IEEE 802.11i, the security scheme for IEEE 802.11 was Wired Equivalent ...
A: Given :- Prior to the introduction of IEEE 802.11i, the security scheme for IEEE 802.11 was Wired Eq...
Q: A float B) double C int D) invalid
A: given - Given this value: 1 1" . what is its data type?
Q: Write a program that prompts for a file name, then opens that file and reads through the file DNSLis...
A: We have to program a prompt file name, open that file, read through the file. Python Program def re...
Q: What are the main functions of an operating system?
A: Introduction: A collection of programmes that coordinates the activities of computer hardware and so...
Q: Choose a number and apply the following operations to it. Divide the number by 2, and add 3 from the...
A: Inductive Reasoning is the method in which we assume some particular number and then derive the rela...
Q: c++ 1- Use UML notations to describe 4 or 5 related classes and their relationships. For each class,...
A:
Q: Convert the following base numerals. a. 1430 to base 4 b. 13127 to decimal
A: The required conversions are done by using the number system principles as described in the next ste...
Q: C program 2. function 2: series_generator2(int n); // n is the number of elements to display // ser...
A: C Program: #include<stdio.h> // Function for series_generator2int series_generator2(int n){ ...
Q: In terms of network security, what is cryptography?
A: Cryptography is a security measure/process in which important messages/information is transformed in...
Q: Create a structure to hold 100 students' roll numbers, scores, names, ages, and addresses. Another u...
A: Introduction: Approach: Here, the array of the Student structure is created to store information of ...
Q: Methods sum need to be created in one class, to find the sum of different type and number of variabl...
A: This concept is called polymorphism. The word polymorphism means having many forms. polymorphism...
Q: Many different approaches may be used to get application software. Here are a few examples. In order...
A: Introduction: An application is a piece of computer software that assists humans in doing tasks. Dep...
Q: Differentiate between the procedural programming and the Object-Oriented programming.
A: NOTE: If there are multiple questions available then we are allowed to solve first question only 1) ...
C++ is a
Make a program that calculates the volume of different containers. Cylinder will be the base class, and its derived classes, also known as child classes or sub-classes, will be constructed.
Create a parent class, Cylinder, first. Make a constant for pi, as you'll need it for any containers that aren't square. For the members, use protected. Finally, add a public function to control the volume.
V = pi * (r2) * h is the formula.
Step by step
Solved in 2 steps with 2 images
- Using c++ programming language. Write a class Distance that holds distances or measurements expressed in feets and inches. Thisclass has two private data members: feet: An integer that holds the feet. inches: An integer that holds the inches. Write a constructor with default parameters that initializes each data member of the class.If inches are greater than equal to 12 then they must be appropriately converted tocorresponding feet. Generate appropriate getter-setter functions for the data members.o void setFeet(int f) and int getFeet()consto void setInches(int i) It should ensure proper conversion to feet.o int getInches() const Define an operator ‘+’ that overloads the standard ‘+’ math operator and allows oneDistance object to be added to another. Distance operator+ (const Distance &obj). Define an operator - function that overloads the standard ‘-‘ math operator and allowssubtracting one Distance object from another. Distance operator-(const Distance &obj)…1. Create a Student class that implements the Person interface. As well as storing the students name and email, also store their course grade (e.g A, B, C) in a member variable. The grade should be accessible via a getGrade method. For the implementation of getDescription return a message along the lines of “A C grade student”, substituting the students actual grade.2. Create a Lecturer class that implements the Person interface. This class should also store the subject that the lecturer teaches. Add a getSubject method, and implement getDescription so that it returns a suitable message, e.g. “Teaches Biology”.3. Create a third class, Employee that implements the interface. This should also store the name of the department the Employee works in (available via getDepartment). Again, getDescription should return a suitable message.Deeper Class Design - the Square Class In this section, your job will be to write a new class that will adhere to the methods and data outlined in the “members” section below (said another way, your classes will implement a specific set of functions (called an interface) that we’ll describe contractually, ahead of time). These classes will all be shapes, with actions (methods) that are appropriate to shape objects, such as “getArea()”, or “draw()”. First we build a Square class that contains the following data and methods listed below, and then later, we will copy it to quickly make a Circle class. Note: when considering each data item below, think about what type of data would best represent the concept we’re trying to model in our software. For example, all shapes will have a coordinate pair indicating their location in a Cartesian coordinate system. This x and y pair may be modeled as ints or floats, and you might choose between the two depending on what the client application will…
- User-defined Class: You will design and implement your own data class. The class will store data that has been read as user input from the keyboard (see Getting Input below), and provide necessary operations. As the data stored relates to monetary change, the class should be named MoneyChange. The class requires at least 2 instance variables for the name of a person and the coin change amount to be given to that person. You may also wish to use 6 instance variables to represent amounts for each of the 6 coin denominations (see Client Class below). There should be no need for more than these instance variables. However, if you wish to use more instance variables, you must provide a legitimate justification for their usage in the internal and external documentation.Your class will need to have at least a default constructor, and a constructor with two parameters:one parameter being a name and the other a coin amount. Your class should also provide appropriate get and set methods for…In C++, Create a class called Date that includes three data members: amonth(type int), a day(type int), and a year(type int). The Date class willhave a constructor with three parameters to initialize the three data members.You may assume the values provided for the year and day are correct, but makesure that the month value is in the range 1-12; if it isn't, set the month to1. Provide set and get functions for each data member. Provide a memberfunction displayDate that displays the date in format MM/DD/YYYY.Write a test program that prompts the user to input the month, the day,and the year and uses your Date class to output the formatted date.User-defined Class:You will design and implement your own data class. The class will store data that has been read asuser input from the keyboard (see Getting Input below), and provide necessary operations. As thedata stored relates to monetary change, the class should be named Change. The class requires atleast 2 instance variables for the name of a person and the coin change amount to be given to thatperson. You may also wish to use 4 instance variables to represent amounts for each of the 4 coindenominations (see Client Class below). There should be no need for more than these instancevariables. However, if you wish to use more instance variables, you must provide legitimatejustification for their usage in the internal and external documentation.Your class will need to have at least a default constructor, and a constructor with two parameters:one parameter being a name and the other a coin amount. Your class should also provide appropriateget and set methods for client usage. Other…
- 3. Person and Customer Classes The Person and Customer Classes Write a class named Person with data attributes for a person’s name, address, and telephone number. Next, write a class named Customer that is a subclass of the Person class. The Customer class should have a data attribute for a customer number, and a Boolean data attribute indicating whether the customer wishes to be on a mailing list. Demonstrate an instance of the Customer class in a simple program.Help of what these errors mean. In C# • Create a Class, named Student, to hold properties of Student Last Name, Student First Name, Student ID (9 digits), Course Prefix and Number, and the tests (Test 1, Test 2, Test 3, Test 4). Create appropriate setter and getter accessors, and constructors. Use access modifiers. Example: First Name : Pat Last Name : Smythe Student ID : ABC111333 Course Prefix : CIST Course Name : 2431 Test 1 : 100 Test 2 : 90 Test 3 : 80 Test 4 : 88 • Prompt the user for the Student Last and First Name, Student ID, Course Prefix and Number and the tests. • Include at least one exception handling function. • Use an array to store the 4 test grades. • Use a looping structure to populate the array. • Calculate the numeric average based upon the 4 equally-weighted numeric grades. • Display all the data for each of student using a looping structure. • Display the numeric average for each student. • Create a function that will convert the numeric average to a…Person and Customer Classes Write a class named (Person) with data attributes for a person’s name, address, and telephone number. Provide accessors/getters and mutators/setters for each attribute. Write a displayPerson() to print out the attributes of the Person. Next, write a class named (Customer) that is a subclass of the (Person) class. The (Customer) class should have a data attribute for a customer number, and a Boolean data attribute indicating whether the customer wishes to be on a mailing list. Provide accessors/getters and mutators/setters for each attribute. Write a display customer() to print out the attributes of the Customer. Demonstrate an instance of the (Customer) class in a simple program.
- use c++ programing language to Write a program to calculate the volume of various containers. A base class, Cylinder, will be created, with its derived classes, also called child classes or sub-classes. First, create a parent class, Cylinder. Create a constant for pi since you will need this for any non-square containers. Use protected for the members. Finally, create a public function that sets the volume. // The formula is: V = pi * (r^2) * hWrite a Program to define a Student class, with member variables String name; intcms String DegreeProg Make a default constructor, Make a parameterized constructor. Overload the above Constructor. Provide getters and setters for data members. Inside main, create 2 students objects. Take data from user and set the values for the 2 students. At the end PrintdaTa.Create an employee class, basing it on previous lab. The member data should comprise an int for storing the employee number, a string for storing the name and a float for storing the employee’s salary. Member functions should allow the user to enter this data and display it. Write a main () that allows the user to enter data for three employees and display it.