What will be the output of the given program class A { int m-20, n-D30; void display() System.out.println(m); class B extends A{ int n-40; void display () System.out.println(n); class Main| { public static void main(String[] args) { B o=new B((); int k=o.n; System.out.println(k);
Q: A GSM system uses 124 channels and each dhannelis dded into time siots. What is the maximum number o...
A: The answer is
Q: Discrete Mathematics: Algorithms. Look at the image attached below and answer the questions.
A: Given :- (a.)List the steps used to evaluate find sums ( [2, 4, 6, 8], 10) . What set is returned?(b...
Q: Question :) Buffers are used to minimise access latency between various levels of the memory hierarc...
A: Step 1 The answer is given in the below step
Q: Consider the adjacency matrix below. Upload a picture (it can be hand drawn) of the adjacency list o...
A: answer is
Q: Task 3 Develop a class diagram for following description: Prepare a class diagram for a graphical do...
A: Given The answer is given below
Q: Implement file l/O operation in this code by taking input from file called "inputX.txt", and show ou...
A: Algorithm: Start Store given data in input.txt file Open input.txt file in read mode and store it i...
Q: Explain why it is important that software products are developed and delivered quickly ?
A: The answer is given below.
Q: ations given below are the mathematical models of the three mixed tanks that are connected in series...
A: I have written the MATLAB Code below:
Q: Which field in the FPU control word allows you to modify the rounding mode of the processor?
A: INTRODUCTION: The FPU control word governs the accuracy of the FPU and the rounding mechanism used. ...
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: Write a Java program to display the push, peek & pop operation on the stack.
A: Stack is a linear data structure which follows a particular order in which the operations are perfor...
Q: Who came up with the motherboard?
A: Who came up with the motherboard?
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: n into
A: given- What is the maximum memory location into which an application software may be loaded?
Q: class A { int m=20, n-D30; void display() System.out.println(m); Elass B extends A{ int n=40; void d...
A: The problem is based on the basics of inheritance in a java programming language.
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: Total = a +b+c; Average = Total / 6; A. Logic Errors B. Run-time Errors C. None of the above D. Synt...
A: Given Total = a + b + c; Average = Total / 6; the above expression has no logic error and run-ti...
Q: The ory oa mp a cks whe ete 2 s ire s f the cache e wt E hee wih 2Mocks per t tes blockof the m ory ...
A: The answer is
Q: virtualization available in AWS, and how do they differ
A: When we’re using AWS, it’s easy for someone — almost without thinking — to choose which AMI flavor ...
Q: 37 (base 10) = ____________________________ (8-bit One's Complement binary) show your work text n...
A: Answer:-
Q: 1. Write an algorithm and flowchart to add the following sequences: a. 1,3,5,7,9. . . N (series of ...
A: Algorithm and flowchart of the above questions are as follows:
Q: Explain why it is important that software products are developed and delivered quickly ?
A: Explain why it is important that software products are developed and delivered quickly ?
Q: Remove all errors from the C++ program given below asap. #include using namespace std; int main({ in...
A: Given: A C++ program is given in which two variables are declared and then a for loop is given in wh...
Q: Write a function that receives a string consisting of several lines of text (paragraph) and returns ...
A: Write a function that receives a string consisting of several lines of text (paragraph) andreturns a...
Q: Buffers are used to minimise access latency between various levels of the memory hierarchy. List the...
A: Let's see the solution in the next steps
Q: Is there a main board or a main board
A: Is there a main board or a main board
Q: Which MS-Windows file system(s) supports disc mirroring, the process by which the same data is writt...
A: Disk mirroring is a simple technique that is used to safeguard the computer system from the possibil...
Q: I need the answer as soon as possible
A: Code: syms xf=sqrt(abs(cos(3*x)))+(sin(4*x).^2)fplot(f,[-2 2])
Q: Write a python program that accepts a string as input and removes characters from the string which a...
A: For this program, we will define an empty string uniqueString and loop through each character of the...
Q: Define the object Circle in a class, considering that the circle has a center coordinates x and y an...
A: The class can find the area (PI^2 * r) and a perimeter (2*Pl*r)
Q: a program that allows you to view and edit the sales amounts for each month of the current year. Exa...
A: def readFile(): sale={} file=open("monthly_sales.txt") for line in file: l=line....
Q: Assume a Scanner reference variable namedinput has been declared, and it is associated with a file t...
A: Program is written. If we not initialize the count variable, we will get compile time error. So coun...
Q: What is Standard Error, and what does it mean?
A: Definition, The standard error(SE) of a measurement is the exact standard deviation of a statistical...
Q: The following decimal numbers are already in six-digit 10’s complementary form. Add the numbers. Con...
A: Answer the above questions are as follows:
Q: All graphs must be plotted using command from Command Window in Matlab. True False
A: Summary: - Hence, we have discussed all the points.
Q: ( Make purchase, View items, Complete check out) Conversion sequence diagram as example
A: answer is
Q: Where did Charles Babbage come up with the computer?
A: Computer has evolved after so long time. The start was from difference engine that was capable of do...
Q: How does an application software restart execution when an interrupt service function has completed?
A: In order to understand this, we must first understand the two main types of interrupts: software and...
Q: Delow and detérmine the values of A and B so that Array[0] has an integer in the range [-23, 71) Arr...
A: Here, I have to choose an option for the above question.
Q: Artificial Intelligence - Adversarial Search 1. Consider the following three variants of minimax se...
A: Introduction: Minimax algorithm: The Minimax algorithm is a recursive method that calculates an opti...
Q: What are some specific inputs that may result in big data?
A: Big Data is a collection of large volumes of data (either structured, semistructured, or unstructure...
Q: Write a program that counts the number of basic steps needed for sorting an array of integer numbers...
A: Given :- Write a program that counts the number of basic steps needed for sorting an array of integ...
Q: When calculating 5!, how many bytes of stack space would the Factorial method use?
A: Answer: 72 Bytes is the correct answer Explaination: The following steps explain how the stack space...
Q: Can you help translate Java Coding. I use BlueJ app 1.Find the mean of 5 elements inserted by user
A: Step 1 : Start Step 2 : Declare an array of size 5 to store the elements input by the user. Step 3 :...
Q: Buffers are used to minimise access latency between various levels of the memory hierarchy. List the...
A: Introduction: A portion of memory within a programme dedicated to holding the data being processed. ...
Q: Buffers are used to minimise access latency between various levels of the memory hierarchy. List the...
A: check further steps for the answer :
Q: Define the term "virtual machine" and explain why it is necessary.
A: The answer is
Q: Create a single SHLD instruction that moves the AX register's highest bit to the DX register's lowes...
A: Introduction: Create a single SHLD instruction that moves the AX register's highest bit to the DX re...
Q: Please provide me with a C++ language program in which a min priority queue is declared and the prio...
A: In this question, we are asked implement a priority queue for the given class myPairClass So, we hav...
Q: Assume the boot record on your disc volume was corrupted. Which file system(s) would allow a backup ...
A: A master boot record (MBR) is a special type of boot sector at the very beginning of partitioned com...
Step by step
Solved in 2 steps
- Write a client program that loops around getting two fractions from the user,output their sum, and state whether or not they are equal. Keep looping until the first fraction entered is a zero fraction. import java.util.ArrayList;import java.util.Scanner; //Define the class Fractionclass Fraction{private int n, d;public Fraction(){//Initialize the valuesthis.n = this.d = 0;}public Fraction(int n, int d){//Initialize the variablesthis.n = n;this.d = d;}//Define the getter function getNum() that returns the numeratorpublic int getNum(){//Returns numeratorreturn n;}//Define the getter function getDen() that returns the denominatorpublic int getDen(){//Returns denominatorreturn d;}//Define the boolean function isZero() that returns 0 if numerator is 0 and denominator is not equals to zeropublic boolean isZero(){return(getNum() == 0 && getDen() != 0);}public boolean isequals(Object c){Fraction f = (Fraction) c;return(Integer.compare(n,f.n))==0 &&…Using Jcreator, open, compile, and run java and observe its runtime. Write your observation regarding how encapsulation works for the program and the data it processed. Limit your paper to a single paragraph with at least 50 words or five (5) sentences. Source code: public class EncapTest { private String name; private String idNum; private int age; public int getAge() { return age; } public String getName() { return name; } public String getIdNum() { return idNum; } public void setAge( int newAge) { age = newAge; } public void setName(String newName) { name = newName; } public void setIdNum( String newId) { idNum = newId; }} public class RunEncap { public static void main(String args[]) { EncapTest encap = new EncapTest(); encap.setName("James"); encap.setAge(20); encap.setIdNum("12343ms"); System.out.print("Name : " + encap.getName() + " Age : " + encap.getAge()); }}(A) Write a program for the Online Turing Machine Simulator to simulate a Turing Machine with one tape that recognizes the language O. Language O {w | w ∈ {a, b}* and a(w) <= b(w)} a(w) = number of a's in a string w. b(w) = number of b's in a string w. (B) Test the Turing Machine with one tape for: one string from the language O one string from the language M or language N Language M M = {w | w ∈ {a, b}* and a(w) == b(w)}. a(w) = number of a's in a string w. b(w) = number of b's in a string w. Language N N = {w | w ∈ {a, b}* and a(w) >= b(w)}. a(w) = number of a's in a string w. b(w) = number of b's in a string w.
- public class Soru32{ // Returns length of LCS for X[0..m-1], Y[0..n-1] static void lcs(String X, String Y, int m, int n) { int[][] L = new int[m+1][n+1]; // Following steps build L[m+1][n+1] in bottom up fashion. Note // that L[i][j] contains length of LCS of X[0..i-1] and Y[0..j-1] for (int i=0; i<=m; i++) { for (int j=0; j<=n; j++) { if (i == 0 || j == 0) L[i][j] = 0; else if (X.charAt(i-1) == Y.charAt(j-1)) L[i][j] = L[i-1][j-1] + 1; else L[i][j] = Math.max(L[i-1][j], L[i][j-1]); } } // Following code is used to print LCS int index = L[m][n]; int temp = index; // Create a character array to store the lcs string char[] lcs = new char[index+1]; lcs[index] = '\u0000'; // Set the terminating character // Start from the right-most-bottom-most…public class Soru32{ // Returns length of LCS for X[0..m-1], Y[0..n-1] static void lcs(String X, String Y, int m, int n) { int[][] L = new int[m+1][n+1]; // Following steps build L[m+1][n+1] in bottom up fashion. Note // that L[i][j] contains length of LCS of X[0..i-1] and Y[0..j-1] for (int i=0; i<=m; i++) { for (int j=0; j<=n; j++) { if (i == 0 || j == 0) L[i][j] = 0; else if (X.charAt(i-1) == Y.charAt(j-1)) L[i][j] = L[i-1][j-1] + 1; else L[i][j] = Math.max(L[i-1][j], L[i][j-1]); } } // Following code is used to print LCS int index = L[m][n]; int temp = index; // Create a character array to store the lcs string char[] lcs = new char[index+1]; lcs[index] = '\u0000'; // Set the terminating character // Start from the right-most-bottom-most…2. Using Java notation, suppose A is the alphabet {'a','b','c' }List the labels of all strings in A* from among thefollowing. a. "" b. "aa" c. "bb" d. "abc"e. "abcd" f. "aaaaaaaa..." (an infinite string ofa's) -> (THIS IS THE PROBLEM #3) <- 3. For alphabet A of the last problem, how many length 4stringsare there in A*?a. 3 b. 4 b. 12 c. 27 d. 81 e. 64 f. 128
- From Big Java 6th edition P9.7: "In this problem, you will model a circuit consisting of an arbitrary configuration of resistors. Provide a superclass Circuit with a instance method getResistance. Provide a subclass Resistor representing a single resistor. Provide subclasses Serial and Parallel, each of which contains an ArrayList<Circuit>. A Serial circuit models a series of circuits, each of which can be a single resistor or another circuit. Similarly, a Parallel circuit models a set of circuits in parallel; using Ohm's Law to compute the combined ressistance." I managed to create appropriate subclasses off of the Circuit superclass. But from here, I'm stuck! How do I compute the combined resistance? and how would I get the method to read the values off of the ArrayList<Circuit>? And does that Circuit refer to the Circuit Class I created, or would that require input for resister amounts?Please implement in Java implement a keyed bag in which the items to be stored are strings (perhaps people’s names) and the keys are numbers (perhaps Social Security or other identification numbers). So, the in- sertion method has this specification: public void insert(String entry, int key);// Precondition: size( ) < CAPACITY, and the // bag does not yet contain any item// with the given key.// Postcondition: A new copy of entry has// been added to the bag, with the given key. When the programmer wants to remove or retrieve an item from a keyed bag, the key of the item must be specified rather than the item itself. The keyed bag should also have a boolean method that can be used to determine whether the bag has an item with a specified key. In a keyed bag, the pro- grammer using the class specifies a particular key when an item is inserted. Here’s an implementation idea: A keyed bag can have two private arrays, one that holds the string data and one that holds the corresponding…Please help debug this: Debugging Exercise 4-3, Farrell, Joyce, Java Programming, 9th edition, Cengage Learning public class DebugBox { private int width; private int length; private int height; private FixDebugBox() { length = 1; width = 1; height = 1; } public DebugBox(int width, int length, int height) { width = width; length = length; height = height; } public void showData() { System.out.println("Width: " + width + " Length: " + length + " Height: " + height); } public double getVolume() { double vol = length - width - height; return vol; } }
- Consider the following code in Java 8:public interface Runnable{void run() ;}public final class Caller {public static void call (String before, String after, Runnable r) (System.out.println(before);r. run() ;System.out.println(after);} }public class MyClass{public static void main(String args[]) (Caller.call("BEFORE", "AFTER",); } }Complete the blark line with some code so that the program prints the folowing to the output: BEFOREHi there!AFTERWrite a java program that can examine school children on multiplication. The kid has to select which multiplication table he wants to be tested in.- Display 10 random questions every time,- Display whether the answers are right or wrong,- Show the correct answers for wrong answers and- calculate the total score (out of 10) ((((It is just AN EXERCISE NOT AN EXAM)))) ThanksConsider class IntArrayStack that has two instance variables: int[] data and int top. Implement an instance method inside the IntArrayStack, called popBottom(),that extracts and returns as output the element at the bottom of the stack. All other elements in the stack must remain unchanged and in the same order.