Vrite a C+ program that prompts the user to enter the earthquake magnitude and utputs its class. We have six classes as follows: 1. MINOR if the magnitude is in [0, 4[, 2. LIGHT if the magnitude is in [4, 5[, 3. MODERATE if the magnitude is in [5, 6[, 4. STRONG if the magnitude is in [6, 7[, 5. MAJOR if the magnitude is in [7, 8[, 6. GREAT if the magnitude is in [8, c¤[. For instance, if the user enters a magnitude of 5.5, the program should output "MODERATE". If the user enters a magnitude of 6, the program should output STRONG. If the user enters a negative value, the program should output the following text: "This is not a valid magnitude value" Hint: use nested if-else statement.
Q: [rdt3.0] Now suppose that the network with a data rate of R b/s can deliver out of order and that th...
A: Reliable data transfer 3.0---------Channels with Errors and Loss Approach: sender waits “reasonabl...
Q: Lists and strings: Perform the following using the list and string defined below: ...
A: Here in this question we have given a list and a string and based on this we have asked to answer fo...
Q: Examine the advantages and disadvantages of various system models.
A: System modeling is the process of developing abstract models of a system with each model presenting ...
Q: The starter code creates a list of first names and a corresponding list of last names. The user is a...
A: - We need to solve the name matching problem. - We have to use python here.
Q: What is the next step in the GPO deployment process now that it has been created.
A: Introduction: Policy settings may be stored in the GPO, which is a collection of policy settings. A ...
Q: when the statement is executed by the Python interpreter. ...
A: value = 4.6666666667. data type = double. value=1. data type =integer. value=11 data type=i...
Q: Write a Python program to show the use of the isinstance() function to check whether the value 0.5 i...
A: # Program to check if 0.5 is an instance(object) of float or not.if isinstance(0.5, float): print...
Q: Convert 1011011002 to
A: With the use of some simple approaches, we can convert a base 10 number to a base 2 number in the tr...
Q: Based on the OSI 7-layer framework in computer networks, to the best of your knowledge, please answe...
A: Actually there are 7 layer in network OSI layer. They are following below : 1) physical layer 2) Da...
Q: 1. Write a program (WAP) to create an undirected graph using adjacency matrix representation. Number...
A: c++ program for undirected graph -------------------------------------------------------------------...
Q: 10). In is fixed. interrupts the starting address A. External interrupt B. Vectored interrupts C. No...
A: According to the question vectored interrupts helps makes starting the service to assign for the dis...
Q: g S and outputs its reverse For example the reverse of ‘pots&pans’ would be ‘snap&stop’ programming...
A: Lets see the solution.
Q: Microsoft Word 2016 has several new and improved features. Which Word 2016 feature do you think is t...
A: the answer is given below:-
Q: od of forensic recovery for fi
A: The method of forensic recovery for files on a solid state drive
Q: -Calculate the average power of the discrete-time wave shown in fig a? *
A: The integral of the step function can be defined as the "sum of the products of the segments on ...
Q: Why is KM such a multidisciplinary area? What challenges does this present?
A: KM is known to be a multidisciplinary field and contributing disciplinary areas are: Management sci...
Q: what the GRANT statement is and how it pertains to the security of the system. What kinds of privile...
A: It is defined as a statement that enables system administrators to grant privileges and roles, which...
Q: What part does database technology play in an organization's data management?
A: Data management is the process of ingesting, storing, organizing, and maintaining the data created a...
Q: य जात्वता %3B
A: Hey champ thanks for your question Your solution is ready please check further steps
Q: Write a program, in python, that checks if the last data item entered appears earlier in the list. ...
A: - We need to check if the last data item entered in a list appeared before or not.
Q: Assume you wish to solve a maximum flow issue using parallel arcs, but you don't have any maximum fl...
A: Given The answer is given below. Answer: Parallel Arcs: Parallel arc shortcomings happen between two...
Q: escribe any problems that may occur while utilising legal software.
A: Given :- Describe any problems that may occur while utilizing legal software.
Q: A collection of consecutive sectors within a volume is called a ________. Cluster Sub-vo...
A: Correct answer is : Partition (Option D)
Q: RAnswer the following questions by circling either true (T) or false (F) 1. T F Every database has m...
A:
Q: her given grammar is SLR(1) or not? Explain step by step. S->Aa/bAc/dc/dba A->d
A: we obtain the state diagram as follows:
Q: -Calculate the average power of the discrete-time wave shown in fig a? * TIT O 1 O 6
A:
Q: Prove De Morgan's Law for set equality AUB = AnB
A: Prove De Morgan's Law for set equality AUB=AnB by showing with a chain of IFF's that x e the left-ha...
Q: Question:: What is the difference between using +/- versus = when setting file permissions? Is there...
A: difference between +-/= setting file permission mode benefit of all.
Q: Load & check the data: 1. Load the data into a pandas dataframe named data_firstname where first nam...
A: As per Bartleby Policy we are answer first 3 parts
Q: Update the name of the student to "John Doe" where its id is 10. Enter your answer 5. Modify the "st...
A: The SQL queries are given below: Note: In the second query I have not added the NULL keyword because...
Q: Write a regular expression for {wE {a, 6}" : w contains either exnctly one or exactly three a's (and...
A: Regular Expression: A regular expression is exists for all the regular languages. A regular expressi...
Q: Add comments to the Python program given below, le = [1,2,3,4,5,6] for e in le: print(e) pr...
A: Add comments to the given Python program. About the program: In the given program, a list is declare...
Q: Write a Runtime test cases using the concept of one variable linear equation.
A: The answer is given below:-
Q: Examine the advantages and disadvantages of various system models.
A: System Models are mainly divided into 5 types: -> Minicomputer model -> Workstation model -...
Q: Question:: What is the difference between using +/- versus = when setting file permissions? Is there...
A: your question is related to set file permission. let's see the solution of the question
Q: product of maxterms expression for F (x, y, z) = E (1, 2, 3, fy the minterms and maxterms of the tru...
A:
Q: Basic data types, keyboard input and conditional statements The front tires of a car should both hav...
A: As there is no programming language mentioned so program is attempted in java language Start in...
Q: What is the difference between hardware and software interrupts, and what are some examples of when ...
A: Introduction: An interrupt produced by an external device or hardware is referred to as a hardware i...
Q: One of the most frequent IT-related issues we encounter deals with connectivity. "I can't get to the...
A: One of the greatest deal and challenge these days, IT has to encounter is of the networking issues o...
Q: 9. Write a Python function called remove_word that accepts two file names and a string as arguments....
A:
Q: Discuss the Life cycle activities of Prototyping model in detail with diagram.
A: Prototyping Model is a type of model which is used in software development where prototype that mean...
Q: a XYZ method
A: There is a method which is used to transfer data from RAM to another location of a computer without ...
Q: Write a program that asks the user for a starting value and an ending value and then writes all the ...
A: num1 = int(input("Enter starting value:")) num2 = int(input("Enter ending value:")) i = num1 while i...
Q: write c++ program to input a year and to check whether it is a leap year or not
A: I have provided C++ CODE along with CODE SCREENSHOT and also provided TWO OUTPUT SCREENSH...
Q: Write a Python program to show the use of the isinstance() function to check whether the value 0.5 i...
A: # Program to check if 0.5 is an instance(object) of float or not.if isinstance(0.5, float): print...
Q: Let's try to add dynamically property of an object and the property must be function and variable in...
A: Required:- Let's try to add dynamically property of an object and the property must be function and ...
Q: Write an assembly language program using GNUSIM8085 i have 30 mins to devliver please slove faster i...
A: Given se faster, Write an assembly language program using GNUSim8085 i have 30 mins to devliver plea...
Q: Can I get a sample email to the dean requesting for the approval of cultural event conducting by me
A: According to the information given:- We have to write an email to dean to take approval of cultural ...
Q: Explain what the memory addressing capacity of the 20-bit address bus will be.
A: given- Explain what the memory addressing capacity of the 20-bit address bus will be.
Q: What is Enumerated Integer providing an example to illustrate your point? Assure uniqueness, qua...
A: Information about Enumerated Integer is given below.
Step by step
Solved in 3 steps with 1 images
- Consider the following C++ class declaration: class SwimmingPool { private: int area; int gallons; public: SwimmingPool() { area = gallons = 0; cout << "In the constructor!\n"; } ~SwimmingPool(); void setArea(int); void setGallons(int); int getGallons() const { return gallons; } }; Consider the following code snippet. How many times do you expect "In the constructor!" to be output? SwimmingPool bellagio[4]; SwimmingPool *poolPtr = bellagio; A) 10 B) 6 C) 5 D) 0 E) 4Write a program in Java for the university consisting of the following categories: A mere Person classification contains the following variables:String name The person's name. 1int id id number. 2Write a constructor that receives the variables and a function (ID int , name String(add) whereYou receive the person's name and ID number and assign them. Write the Students class that inherits from the Person class containing the variablesnext:String Specialization The student's specialization. 1double gpa student average. 2Write a constructor that accepts the variables. (Two and a half degrees). Write the Employee class that inherits from the Person class containing the variablesnext:String jop The job name. 1int salary 2Write a constructor that accepts the variables. Create an interface for the program as shown in the following imageWrite a Java program for a class named Baby. A Baby has a name of type String and an ageof type integer.Supply two constructors: one will be the default constructor, that just setsdefault values for the name and age; the second constructor will take twoparameters, a string to set the name and an integer to set the age. Also, supplymethods for setting the name, setting the age, getting the name and getting theage.The class should not contain I/O methods; input of values to the instancevariables must be done with a set method or constructor, output of values fromthe instance variables must be done with get methods. The set method for thename instance variable should ensure that the input is not empty or containwhitespaces (otherwise set a default value). The set method for the ageinstance variable should validate the input to be between 1 and 4 inclusive(otherwise set a default value).Give Java code for an equals method for the Baby class. Babies count asbeing the same (i.e. equal) if…
- write a c++ program in which Imagine a tollbooth at a bridge. Cars passing by the booth are expected to pay a 50 Rs. Mostly they do, but sometimes a car goes by without paying. The tollbooth keeps track of the number of cars that have gone by, and of the total amount of money collected. Model this tollbooth with a class called tollBooth. The two data items are a type unsigned int to hold the total number of cars, and a type double to hold the total amount of money collected.A constructor initializes both of these to 0. A member function called payingCar() increments the car total and adds 0.50 to the cash total. Another function, called nopayCar(), increments the car total but adds nothing to the cash total. Finally, a 2 members function called display() (using method overloading) displays the totals number of cars and total amount of money .Include a program to test this class. This program should allow the user to push one key to count a paying car, and another to count a nonpaying…Write a oop c++ program to create a payroll system using inheritance. Two types of employees paid weekly 1. Salaried employees: fixed salary irrespective of hours. 2. Commission employees: paid by a percentage of sales. The information know about each employee is his/her first name, last name and national identity card number. The reset depends on the type of employee.IN C++ Implement a class Car with the following properties. A car has a certain fuel efficiency (measured in miles/gallon or liters/km—pick one) and a certain amount of fuel in the gas tank. The efficiency is specified in the constructor, and the initial fuel level is 0. Provide another parameterized constructor which takes both efficiency and fuel as parameters. Also supply methods getGasInTank, returning the current amount of gasoline in the fuel tank. getEfficiency() return the efficiency of car. setGasInTank(double fuel), to add gasoline to the fuel tank. setEfficiency(double efficiency) Supply a method Drive () that simulates driving the car for a certain distance, reducing the amount of gasoline in the fuel tank according to its efficiency. Sample usage: Car myHybrid (50); // 50 miles per gallon myHybrid.addGas(20); // Tank 20 gallons myHybrid.Drive(100); // Drive 100 miles double gasLeft = myHybrid.getGasInTank(); // Get gas remaining in tank Supply a main method that tests…
- Write a program IN JAVA for an instructor whose course has the following policies: Two quizzes, each graded on the basis of 10 points, are given. One midterm exam and one final exam, each graded on the basis of 100 points, are given. The final exam counts for 50 percent of the grade, the midterm counts for 25 percent, and the two quizzes together count for a total of 25 percent. (Do not forget to normalize the quiz scores. They should be converted to percentages before they are averaged in.) Any grade of 90 percent or more is an A, any grade between 80 and 89 percent is a B, any grade between 70 and 79 percent is a C, any grade between 60 and 69 percent is a D, and grade below 60 percent is an F. The program should read in the student’s scores and display the student’s record, which consists of two quizzes scores, two exams scores, the student’s total score for the entire course, and the final letter grade. The total score is a number in the range to 100, which represents the…Write a C# program that plays Rock–paper–scissors game. The user bets 10 dollars on the Rock–paper–scissorsgame. The payouts are defined as follows:• If the user wins, the user gets 2x the bet.• Otherwise, the user loses the bet.The game continues until:• the user is out of money• or the user chooses to quit the game by entering 0• or either the user or the computer wins 4 games first.The user initially has 100 dollars.Design a modularized solution with two classes. Develop your own program structure.Make a program with classes that takes the student control Java languagemenu where first enter the name, name of subjects, average of the subjects per studenthow many students won and that the admitted students display, the courses and their average
- Write a C# program that lets the user enter an object’s mass and then calculates its weight. If the objectweighs more than 500 Newtons, display a message indicating that it is too heavy. If the object weighsless than 10 Newtons, display a message indicating that it is too light.Help write the code for the follwing problem starting from scratch Write a complete C++ program in three files here that asks the user to enter a radius for a circle then calculates and prints its' area. The area should be calculated using the formula area = 3.14 * radius * radius. You must have a class called Circle that stores the radius as a double value and can calculate its' own area via a method called calcArea that takes no parameters and returns the area. The circle class may not print the area or radius! Hint: calcArea should take no parameters and return a double. For this version, make radius private and write setter (mutator) and getter (accessor) methods and/or constructors as needed to modify (set) and retrieve (get) the value of radius. Input Validation: If a negative radius is passed to an object of the Circle class, whether through a setter or a constructor, set the radius to 0 instead of using the negative value. This program MUST be split into three files: Header…Write a C# program named Averages that includes a method named Average that accepts any number of numeric parameters, displays them, and displays their average. For example, if 7 and 4 were passed to the method, the output would be: 7 4 -- Average is 5.5 Test your function in your Main(). Tests will be run against Average() to determine that it works correctly when passed one, two, or three numbers, or an array of numbers.