class A { int m=20, n-D30; void display() System.out.println(m); Elass B extends A{ int n=40; void display() System.out.println(n); Lass Main nuhlic static void main(String[] ar
Q: python pr
A: I have written python code for the following question:
Q: top come out?
A: A laptop, often known as a notebook computer or laptop, is a small, portable computer with a screen ...
Q: the meaning of the dot in from of the directory name “.puta” and “.t0rn”?
A: The meaning of the dot in from of the directory name “.puta” and “.t0rn” in linux means these folde...
Q: Question 7
A: Answer of question 7 the code looks like follow: int main(int argc, char*argv[]) { while(1) { ...
Q: The capacity of the memory am defined ty eber of wond mplied by the ber of hitswoed How many wparaie...
A: The capacity of a memory unit is defined by the number of words multiplied by the number of bits/ wo...
Q: Alice and Bob use the ElGamal scheme with a common prime q= 131 and a primitive root a = 6. Let Bob’...
A: The answer is
Q: Prove that C = {w|w has an equal number of 0s and 1s} is not regular. Consider the string s=0p1p.
A: If A is a regular language, then there is a number p (the pumping length) where if s is any string i...
Q: When transmitting data back and forth to the cloud, physicians must follow HAPAA regulations; penalt...
A: Measures done to ensure the safety of patients ConfidentialityEach individual's medical information ...
Q: C++ Programming Question Explains the number of methods from which we can take the string input from...
A: Explain the methods from which we can take string input from the user.
Q: Convert the following PDA to a CFG.( Correct answer only). Proper steps and conversion
A: Convert the following PDA to a CFG.( Correct answer only).
Q: Define the term "virtual machine" and explain why it is necessary.
A: Introduction: A virtual machine is created on a physical hardware system (off-premises) that acts as...
Q: Extend DATAVIEW to support some blockchain features, such as the support of Metatask, a new token to...
A: Blockchain can enable Universal Basic Income, (UBI) through a system like Circles, or power local cu...
Q: The value of the keyboard flag byte is returned by which INT 16h function
A: Hi there, Please find your solution below, I hope you would find my solution useful and helpful. Tha...
Q: Using doc function, determine what the dot-forward slash (./) operator does.
A: . is a current list shorthand and is used in Linux and Unix to create an integrated program for the ...
Q: Variable x' is assigned to X19 Variable 'y' is assigned to X20 Assume the operation returns the abso...
A:
Q: 28. Write an assembly language program that corresponds to the following C++ program: #include usin...
A: Given :- Write an assembly language program that corresponds to the following C++ program:#include ...
Q: Consider the adjacency matrix below. Upload a picture (it can be hand drawn) of the adjacency list o...
A: Dear student, We valued your time but as per guidelines, I can answer the only first question. Pleas...
Q: Alice and Bob use the ElGamal scheme with a common prime q= 131 and a primitive root a = 6. Let Bob'...
A: Key generation Common prime q=131 primary root αα = 6 Bob's public key YBYB =3 Random integer chosen...
Q: PARALLEL AND DISTRUBUTED COMPUTING write code in c++
A: CODE:- In C++ program of multiplication of matrix n*n. #include <iostream> using namespace s...
Q: I need to write 2-3 pages report of "fake news detection" which is the topic of my project. in this ...
A: Let's discuss the solution in the next steps
Q: Develop a c programm that reads a text file (input1.txt) containing a list of sentences and, for eac...
A: import re def open_file(): ##method to open a file while(True): text = raw_input("Ente...
Q: A security analyst receives an alert regarding multiple logins to the corporate doud infrastructure ...
A: As per Bartleby guidelines, Since you have asked multiple question, we will solve the first question...
Q: What is the difference between an interrupt service routine and a regular service routine?
A: An interrupt service routine (duh!) services an "interrupt". An "interrupt" is pretty much that -- t...
Q: Total = a +b +c; Average = Total /6; A. Logic Errors B. Run-time Errors C. O С. None of the above Sy...
A: Answer : It is a logical error . As there are three variables in the total and the sum of three var...
Q: 4-5 A Girl Scout needs to calculate the total dollar amount of her cookie orders. User input should ...
A: Given :- 4-5 A Girl Scout needs to calculate the total dollar amount of her cookie orders. User inpu...
Q: Consider the int Array below and determine the values of A and B so that Array[0] has an integer in ...
A: The question is to find the values of A and B.
Q: 3 per minute and each is expected to use the software for 20 minutes (1 student stops using
A: The answer is
Q: mass is in kg and height is in m) vars %>% mutate(mass height^2) % mutate(mass/(height/100)^2) vars ...
A: BMI <- starwars$mass / (heightm^2) starwars$BMI = BMI starwars %>% mutate(name, bmi = mass...
Q: What is the default visual mode when a computer is launched under MS-DOS?
A: Introduction: MS-DOS, IBM PC DOS, and certain operating systems that try to be compatible with MS-DO...
Q: You have a graph G = , |V| = n and |E| = m (represented using adjacency matrix you can). Given such ...
A: Java code for the brute- force algorithm for the given graph import java.util.*; public class Graph...
Q: When did the mechanical computer first come out?
A: The answer is as follows.
Q: 2. Write a program to graph the following equation in the interval. The interval step size is 0.5. C...
A: Introduction:
Q: The chip select kogie for a cenais DRAM chip in a memory system desigs is shoan belew Assume that de...
A: The answer is here
Q: What is the IEEE-754 single precision real number after encodingt the real decimal number -76.0625? ...
A: The correct option is b For details check image below
Q: Consider the figure below, which draws the analogy between store-and-forward link transmission and ...
A: 1) When a car enter service at the tollbooth, it takes 1 second service time. 2) It takes 10 second ...
Q: show your work text not a picture -35 (base 10) = ____________________________ (8-bit Excess-M bi...
A: Converting -35 to base 10. -*102=0 3*101=30 5*100=5 Adding all to get Ans=3510
Q: Write a Java program to display the push, peek & pop operation on the stack.
A: import java.util.Stack; public class Main{ public static void main(String[] args) { Stack<...
Q: What can you do with a DWORD?
A: -It is a short for (double word). -basically it is a data type definition which specific to microsof...
Q: Describe various employment legal documents including: non-disclosure agreements, non-compete clause...
A: An employee is prohibited from exposing any of the employer's private information, business processe...
Q: C++ Imagine you have to verify the type of integer variable foo below, include header print to s...
A: C++ Imagine you have to verify the type of integer variable foo below, include <typeinfo> he...
Q: Define the term "virtual machine" and explain why it is necessary.
A: Virtual Machine: It is a machine created on a physical hardware system (off-premises) that acts as a...
Q: How are truly distributed systems modeled?
A: A distributed system uses resources from different system located on multiple networks. Distributed ...
Q: Appendix 1: UI Layer DriveWell Inc. Aphumme n h Cart detals VN Mamber Ca2 detals Carl deta Car Make ...
A: Answer: HTML and CSS Source Code: <!DOCTYPE html> <html lang="en"> <head> &l...
Q: In Matlab using ode23 comment, plot c,t graphs Data: Q=constant= 300 L/min, V= constant= 50 000 L, ...
A: Given that: Data: Q=constant= 300 L/min, V= constant= 50 000 L, t=0; C=Co,
Q: Task: Assume that your Student ID (e.g. 2018123456) is a fractional decimal and hexadecimal number w...
A: This question belongs to digital electronics . It is based on the conversion of decimal into binary
Q: What is the SI/DH register's code?
A: Introduction: The 16-bit index registers are called SI (Source Index) registers. It is used to condu...
Q: Consider a system implementing multilevel queue scheduling. What strategy can a computer user employ...
A: Answer: The software might optimise CPU time by not completely using its time quantums.Using a big p...
Q: Let A %3D (с, n, b), В%3 (х, у) and C %3 (0, 1). Find a) AXBXC b) СХВХА с) ВХСХ
A: The cartesian product of 3 sets produces another set such that, the new set has tuples of 3 elements...
Q: Which kind of parallelism (data or control) is optimal for SIMD? What kind of parallelism does MIMD ...
A: Introduction: Program-level parallelism is decentralizing a single program and running it on several...
Q: ould be men
A: given - At least three FPU special-purpose registers should be mentioned.
Step by step
Solved in 2 steps with 1 images
- 1- public class Con{ public static void main(String[] args) int[] ar=(2,5,7,9}; int i=2; final int j=1; 6. for (int x:ar) 8- { 9 if(ar[i]public class TwoColors 10 { public static void main(String[] args) { Scanner in = new Scanner(System.in); 11 12 13 14 System.out.print("Enter your first favorite color: "); 15 16 // Step 2: Read in the next line of input and assign • it to a String variable color1 17 // 18 19 // Step 3: Trim spaces from both end and convert the // // 20 input to all lowercase and assign it back 21 22 to the same variable 23 24 System.out.print("Enter your second favorite color: "); 25 26 // Step 4: Read in the next line of input and assign 27 // it to a String variable color2 28 29 30 // Step 5: Trim spaces from both end and convert the // // 31 input to all lowercase and assign it back 32 33 to the same variable 34 35 // Step 6: Display a message according to the following: // 36 first color 37 second color message light blue 38 red That's wonderful! light blue 39 red That's even better! That's also great! 40 otherwise 41 42import java.util.Scanner; public class Application {public static void main(String[] args){ int Num;float Ave;Employee[] Emp = new Employee[100]; System.out.println("Enter the number of employees:");Num = Integer.parseInt(new Scanner(System.in).nextLine());for (int i = 0; i < Num; i++){ Emp[i] = new Employee();Emp[i].Input();} System.out.printf("The list of employees:");System.out.println();Display(Emp, Num);Ave= AverageSalary(Emp, Num);System.out.printf("\nAverage salary is:" + "%.2f", Ave); System.out.printf("\nThe employee with highest salary is:\n" + employeeHigh(Emp, Num));}private static float AverageSalary(Employee [] emps, int n){float sum=0; for (int i = 0; i < n; i++)sum = sum + emps[i].salary;return sum/n;}private static void Display(Employee[] arr, int n){ for (int i = 0; i < n; i++){System.out.printf("%s",arr[i]);}}private static Employee employeeHigh(Employee[] arr, int n){ float high= arr[0].salary ;int iHigh = 0;for (int i = 1; i < n; i++){if( arr[i].salary…12. What is the output of this program? class A { int i; void display0 { System.out.println(i); } } class B extends A { int j; B0{ ++j; } void display) { System.out.printIn(); } } public class Test { public static void main(String args[]) { B obj = new B(); obj.i=1; obj.j+ =2; obj.display); } }Expand the wedding class to include six weddings. import java.time.*;public class TestWedding{public static void main(String[] args){LocalDate date1 = LocalDate.of(1986, 12, 14);LocalDate date2 = LocalDate.of(1984, 3, 8);LocalDate date3 = LocalDate.of(1991, 4, 17);LocalDate date4 = LocalDate.of(1992, 2, 14);LocalDate date5 = LocalDate.of(2016, 6, 18);LocalDate date6 = LocalDate.of(2016, 6, 25); Person bride1 = new Person("Kimberly", "Hanson", date1); // Create New personPerson groom1 = new Person("Mark", "Ziller", date2); // Create New personPerson bride2 = new Person("Janna", "Howard", date3); // Create New personPerson groom2 = new Person("Julius", "Nemo", date4); // Create New personCouple couple1 = new Couple(bride1, groom1); // Create New coupleCouple couple2 = new Couple(bride2, groom2); // Create New coupleWedding wedding1 = new Wedding(couple1, date5, "Mayfair Country Club");// create a wedding and send it couple1, date5 and a placeWedding wedding2 = new Wedding(couple2,…public class Average { /** * @param args */ publicstaticvoid main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter the number of classes: "); intnumClasses = input.nextInt(); int[] numStudents = newint[numClasses]; inttotalStudents = 0; for (inti = 0; i < numClasses; i++) { System.out.print("Enter the number of students in class " + (i + 1) + ":"); numStudents[i] = input.nextInt(); totalStudents += numStudents[i]; } intaverageStudents = totalStudents / numClasses; System.out.println("The average number of students per class is " + averageStudents); System.out.println(); System.out.println("Class\tNumber of Students"); for (inti = 0; i < numClasses; i++) { System.out.print((i + 1) + "\t\t" + numStudents[i]); } } } Write a Java program that solves the following problem. Name your class Average. Your program will determine the average number of students per class in a school. It should begin by requesting the number of classes in…import java.util.Scanner; public class StudentScores { public static void main (String [] args) { Scanner scnr = new Scanner(System.in); final int SCORES_SIZE = 4; int[] lowerScores = new int[SCORES_SIZE]; int i; for (i = 0; i < lowerScores.length; ++i) { lowerScores[i] = scnr.nextInt(); } for (i = 0; i < lowerScores.length; ++i) { System.out.print(lowerScores[i] + " "); } System.out.println(); } }Answer: 1 public class Con{ public static void main(String[] args) 3- { int[] ar=(2,5,7,9}; 5 4 int i-2; final int j=1; for (int x:ar) 8- { 9. 7 if(ar[i]class Param3 { public int x; private void increase(int p) { x = x*p; } public void calculateX(int y) { increase(y); } public int getX() { return x; } } // in another class Param3 q3 = new Param3(); q3.x = 5; q3.calculateX(7); System.out.println(q3.getX()); what would be the answer for the last two lines ? also above were x = x*p do both x in here are the fields? wouldn't that be cnofusing?import java.util.Scanner; public class MorgansBonuses { public static void main(String[] args) { int WeeksWorked; int Reviews; int x, y; final int Quit = 99; double[][] bonuses = { { 5, 9, 16, 22, 30 }, { 10, 12, 18, 24, 36 }, { 20, 25, 32, 42, 55, 68 }, { 46, 54, 65, 77, 90 }, { 60, 72, 84, 96, 120 }, { 85, 100, 120, 140, 175 } }; Scanner ID = new Scanner(System.in); System.out.println("Please enter the number of weeks the employee has worked or " + Quit + " to quit.>>"); WeeksWorked = ID.nextInt(); while (WeeksWorked != Quit) { System.out.println("Please enter the number of positive reviews the employee has recieved or " + Quit +" to end program.>>"); Reviews = ID.nextInt(); if (WeeksWorked >= bonuses.length) { WeeksWorked = bonuses.length - 1; } if (Reviews >= bonuses[0].length) { Reviews =…class TenNums {private: int *p; public: TenNums() { p = new int[10]; for (int i = 0; i < 10; i++) p[i] = i; } void display() { for (int i = 0; i < 10; i++) cout << p[i] << " "; }};int main() { TenNums a; a.display(); TenNums b = a; b.display(); return 0;} Write a copy constructor for the above class TenNums. Make sure it performs deep copy. Group of answer choices TenNums(const TenNums& b) { p = b.p;} TenNums(const TenNums& b) { p = new int[10]; for (int i = 0; i < 10; i++) p[i] = b.p[i];} TenNums(const TenNums b) { p = new int[10]; for (int i = 0; i < 10; i++) p[i] = b.p[i];} TenNums(const TenNums b) { p = b.p;}class TenNums {private: int *p; public: TenNums() { p = new int[10]; for (int i = 0; i < 10; i++) p[i] = i; } void display() { for (int i = 0; i < 10; i++) cout << p[i] << " "; }};int main() { TenNums a; a.display(); TenNums b = a; b.display(); return 0;} Continuing from Question 4, let's say I added the following overloaded operator method to the class. Which statement will invoke this method? TenNums TenNums::operator+(const TenNums& b) { TenNums o; for (int i = 0; i < 10; i++) o.p[i] = p[i] + b.p [i]; return o;} Group of answer choices TenNums a; TenNums b = a; TenNums c = a + b; TenNums c = a.add(b);SEE MORE QUESTIONSRecommended textbooks for youDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSONC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag…Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill EducationDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSONC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag…Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education