Perform addition operation on complex data using class and object. The program should ask for real and imaginary part of two complex numbers, and display the real and imaginary parts of their sum. Input 1. Real1 2. Imaginary1 3. Real2 4. Imaginary2 Output Sum of two complex numbers Enter the first complex number Enter the Real Part: 8 Enter the Imaginary Part: 8 First Complex Number is 8 + 8 1 Enter the second complex number Enter the Real Part: 2 Enter the Imaginary Part: 3 Second Complex Number is 2 + 3 i The sum of two complex numbers is 10 + 11 i
Q: For a network address 192.168.10.0 and subnet mask 255.255.255.224 then Calculate: i) Number of…
A: Answer: Given network Address:192.168.10.0 And subnet mask 255.255.255.224 and we need find the…
Q: How should the many ethical issues that have arisen because of the widespread use of digital…
A: Digital Technologies:- The digital technologies used the information technology with the components…
Q: Discuss Advantage and disadvantage of Ring.
A: Introduction: A ring topology may be a network architecture where devices are connected in a circle…
Q: C Programming: In this unit, you will create 3 functions: main(): Call print_stack() and then call…
A: The answer is given below.
Q: Discuss the advantages and Disadvantages of Bus.
A: answer is
Q: A slotted ALOHA channel has an average 10% of the slots idle. a) What is the offered traffic G? b)…
A:
Q: Discuss Advantage and disadvantage of Ring.
A:
Q: Use Java Programming You have to distinguish spies that are hiding in plain sight and among the…
A: The JAVA code is given below with output screenshot
Q: In particular, how should one approach the moral challenges posed by modern technologies like…
A: Introduction: Computer Technology, Information Technology, Information Networks, and the Internet's…
Q: Explain Mesh Topology.
A:
Q: Rock, Paper, Scissors Game Create a application using (C#) in Microsoft Visual Studio that lets the…
A: Solution is mentioned in below...
Q: You are asked to do some modelling development of a Bank accounts management system using the…
A: ANSWER: You are required to model and create a bank accounts management system using the…
Q: Which one of the following statement is not true: A complex object is formed by combining other…
A: The above question is solved in step 2 :-
Q: A small organization is given a block with the beginning address and the prefix length…
A: Answer is mentioned in below..
Q: name: string - ownerName: String + Cat (name: String, ownerName: String, numberOfTeeth: int,…
A: “Since you have asked multiple question, we will solve the first question for you. If youwant any…
Q: The roles that Lexical analyzers and Syntax analyzers play in the compilation process cannot be…
A: The question has been answered in step2
Q: system utilities
A: Utilities in computer: Utility is a small program. It provides an addition to the capabilities…
Q: This HTML attribute/value is added to an a anchor) element (along with a href attribute) to make a…
A: The answer is given below.
Q: Discuss Advantages and Disadvantages of co-axial cable.
A: Co-axial Cable: A form of copper cable known as coaxial cable is designed to prevent signal…
Q: input parameters when called. Here, d is a dictionary, k is a key and vis a value. function will add…
A: Algorithm for the code : 1. Start2. Create a dictionary d.3. Initialize key 'A' with value 1 in…
Q: Subject: Data Engineering Study MySQL Replication and discuss its advantages and disadvantages…
A: Introduction MySQL: MySQL is indeed an Oracle database management system (RDBMS) based on structured…
Q: 9) Write two functions to compute the GCD & LCM of two numbers. Make function call from main().
A: THE ALGORITHM OF THE CODE IS SHOWN BELOW:- 1. Start 2. Take input from the user for the first…
Q: . In the above class (MyClass), overload __add__, __eq__, and __lt__ operators as follow: a) sum =…
A: The updated Python program is given below:
Q: 2. Write a program whose input is a string which contains a character and a phrase, and whose output…
A: Since no programming language was mentioned, the provided solution is in the Python programming…
Q: 1 об 92 91 0,1
A: The transition table tells us that at what will be the next state from the current state for the…
Q: 5) This HTML attribute/value is added to an a (anchor) element (along with a href attribute) to make…
A: As we know Anchor tag is an HTML element that creates a link to a target URL in it Anchor tag…
Q: Explain Transmission media
A:
Q: FizzBuzz, you are told to print the numbers from 1
A:
Q: List the applications of minimum spanning tree?
A: The process of creating a set of instructions that tells a computer how to perform a task is known…
Q: Find the subnetwork address and the host id for the following: IP address: 120.14.122.16 Mask:…
A: Here in this question we have given a ip address with subnet mask and we have asked to find subnet…
Q: C++ LIST STL INSERT NUMBERS FROM 14 to 27, THEN REVERSE THE LIST ND PRINT THE REVSERSED LIST.
A: Here, Code instruction is given.
Q: ΜΑΙ Solve the system of non-linear equations: x³-2x²y + xy² =49 2 x²+xy+4y² = 19
A: We will use MATLAB Code to solve the equation:
Q: For AVL trees, make sure to check for balance after each operation and rotate if necessary before…
A: The process of creating a set of instructions that tells a computer how to perform a task is known…
Q: What are the two interfaces provided by protocols?
A: Definition: The activities that local objects may carry out on the protocol are specified by the…
Q: For a network address 192.168.10.0 and subnet mask 255.255.255.224 then Calculate: i) Number of…
A: 1. A computer network refers to interconnected computing devices that can exchange data and share…
Q: Please find two open-source python packages or web APIs that you find particularly interesting or…
A: For activities involving data analysis, Python is one of the best and most popular languages among…
Q: Discuss the characteristics of Co-axia Cable.
A: Coaxial cable : A coaxial cable is a type of electrical cable that has an inner conductor surrounded…
Q: Card Number Required field, Valid Card Number form validation Modulus Check Logic For…
A: Introduction: In order to prevent data with errors from being transferred to the server, HTML form…
Q: What is meant by distributed systems?
A: Answer : In a distributed system various components of the computer system are distributed across…
Q: What is meant by Batch Systems?
A: Batch systems: The ultrasonic cleaning bath will typically form the foundation of batch systems,…
Q: enumerate characteristics of IOT and explain briefly the reasons to coverage the technologies and…
A: The World of Internet is ever increasing rapidly .The Amount of information available now a days is…
Q: In the following, we use the following notations: no(w) = number of 0's in a string w, n₁(w) =…
A: Given the language: L={w:n0(w)=2*n1(w)} We need to design the Turing machine using JFLAP.
Q: Find the sub-network address for the following. Sr. No. a) b) c) IP address 141.181.14.16…
A: Given: To find the sub-network address for the following:
Q: What is meant by Indirect Communication?
A: The above question is solved in step 2 :-
Q: Define Convex-Hull Problem.
A: Given: Explain convex hull problem.
Q: Discuss What is Network Topologies.
A: Network topologies: The network's topology describes how all of the components are linked to one…
Q: difference between how and Please give an example to show the main difference between touch and cat.
A: Solution : It has always been a source of confusion for Unix beginners, the difference between cat…
Q: calculate number of operations in this algorithm void my_dgemv(int n, double* A, double* x,…
A: The question is to calculate the number of operations in the given algorithm.
Q: Should the government and law enforcement be able to access Facebook accounts in order to probe…
A: Answer: Yes. Facebook. Facebook, a social network site, is being utilised as evidence against…
Q: A dedicated server is a computer that a customer purchases for exclusive use in the public cloud.…
A: Answer: Introduction: A dedicated server will always make your own storage space so that they will…
Code using Python
Step by step
Solved in 3 steps with 1 images
- 1. Write a program in a class EvensOddsAvg that counts the integers that are below the average. Read fifteen integers from the keyboard and place them in an array. Compute the sum and count of the evens and the odds separately. Find the average of the integers, and count and display the integers which are below average. Please Java CodeAssignment A scientist has developed a mathematical model for a physical process, and he wants to check how good is model is. To evaluate the correctness of his model, he wants to test the results of his model under certain parameters and compare them with experimental results. Write a program that first reads the number of tests (testCount) as an int followed by the results of each test according to the model as a double array (testModel) and finally the results of each test according to experiments as a double array (testExperiment). Then, the program should calculate the error of the model by evaluating the average of the absolute values (i.e., mutlak değer) of the differences between the model result and experimental result (see formula below) using a function. ItestModel,- textExperiment, testCount NOTE: Individual absolute value of the difference between the model value and the experiment value calculations MUST be done in the function. Every other functionality MUST be done in…Pseudocode for Java code Write the algorithm in pseudocode for a method that accepts three parameters: an integer array, an integer representing the number of valid values in the array, and an integer representing a factor. The method will count the number of valid values in the array that are multiples of the factor and will return the count. There is a Java operator that might be very helpful in solving this problem. Testing Above problem: Assuming that the first two parameters are an array containing 4, 10, 15, 12, 8, 20, 100, 25, 32, 7, 28, and 48 and the number 12, come up with three good test cases for the factor and the return value. factor numMultiples
- Total OccurranceGiven two integer numbers input1 and input2, find the total number of occurrences of input1 in aseries of natural numbers from 0 till input2.Note:1. input1 will be within 1-9 and1. input2 will be within 1 – 100.Prototype: public int findTotalOccurrence(int input1, int input2)Example 1:input1 = 2input2 = 20output = 3Explanation: Number 2 is repeated 3 times in the series of natural numbers from 0 - 20 ie at 2,12, 20.Example 2:input1 = 2input2 = 30output = 13Explanation: Number 2 is repeated 13 times in the series of natural numbers from 0 – 30 i.e. at 2,12, 20, 21, 22 (occurred twice), 23, 24, 25, 26, 27, 28, 29Instructions Insurance.java >- Terminal + 1 import java.util.Scanner; sandbox $ 0 2 class Insurance { The Harrison Group Life Insurance company computes public static void main (String args[]) { // Write your code here annual policy premiums based on the age the customer 4 turns in the current calendar year. The premium is } computed by taking the decade of the customer's age, adding 15 to it, and multiplying by 20. 7 public static int calculatePremium(int curr, int birth) { 8 // Write your code here } For example, a 34-year-old would pay $360, which is calculated by adding the decades (3) to 15, and then 10 } 11 multiplying by 20. Write an application that prompts a user for the current year then a birth year. Pass both to a method that calculates and returns the premium amount, and then display the returned amount. An example of the program is shown below: Enter the current year >> 2020 Enter the birth year >> 2001 The premium is $320 Grading Write your Java code in the area on the…Java Programming : At a fun fair, a street vendor is selling different colours of balloons. He sells N number of different colours of balloons (B[]). The task is to find the colour (odd) of the balloon which is present odd number of times in the bunch of balloons. Note: If there is more than one colour which is odd in number, then the first colour in the array which is present odd number of times is displayed. The colours of the balloons can all be either upper case or lower case in the array. If all the inputs are even in number, display the message 'All are even'. Example 1: 7 -> Value of N [r,g,b,b,g,y,y] -> B[] Elements B[0] to B[N-1], where each input element is separated by new line. Output: r -> [r,g,b,b,g,y.y] →> 'r' colour balloon is present odd number of times in the bunch. Explanation: From the input array above: r: 1 balloon g: 2 balloons b: 2 balloons y: 2 balloons Hence, r is only the balloon which is odd in number.
- Write the definitions of the member functions of the classes arrayListType and unorderedArrayListType that are not given in this chapter. The specific methods that need to be implemented are listed below. Implement the following methods in arrayListType.h: isEmpty isFull listSize maxListSize clearList Copy constructor Implement the following method in unorderedArrayListType.h insertAt Also, write a program (in main.cpp) to test your function.Problem 1: Create a Java class RecursiveMethods.java and create the following methods inside: ALL THE METHODS NEED TO BE COMPLETED RECURSIVLY. NO LOOPS ALLOWED. oddEvenMatch Rec: the method takes an integer array as a parameter and returns a boolean. The method returns true if every odd index contains an odd integer AND every even index contains an even integer(0 is even). Otherwise it returns false. sumNRec: The method takes an integer array A and returns the sum of all integers in the parameter array. nDownToOne: Takes an integer n and prints out the numbers from n down to 1, each number on its own line. inputAndPrintReverse: Inputs integers from the user until the user enters 0, then prints the integers in reverse order. For this method, you may NOT use an array or any type of array structure, in other words, you may not use any structure to store the user input. After completing the methods, use the main method to test them. You can hard code the tests.mergeAndRemove(int[], int[]) This is a public static function that takes a int[] and int[] for the parameters and returns an int[]. Given two arrays of integers. Your job is to combine them into a single array and remove any duplicates, finally return the merged array.
- National University of Science & Technology NUST has conducted a programming test for level1ITMB students and pass mark for the exam is 35. Write a JAVA program to read the number ofstudents who attended the test, the marks scored in an array and find the sum and average marks.Coupon Collector is a classic statistics problem with many practical applications. The problem is to pick objects from a set of objects repeatedly and find out how many picks are needed for all the objects to be picked at least once. A variation of the problem is to pick cards from a shuffled deck of 52 cards repeatedly and find out how many picks are needed before you see one of each suit. Assume a picked card is placed back in the deck before picking another. Write a program to simulate the number of picks needed to get four cards, one from each suit and display the four cards picked (it is possible a card may be picked twice).Write a class with name Arrays . This class has an array which should be initialized by user.Write a method Sum that should sum even numbers in array and return sum. write a function with name numFind in this class with working logic as to find the mid number of an array. After finding this number calculate its factorial.Write function that should display sum and factorial.Don’t use divide operator