The program uses an array for shape reference to objects of each concrete class given. The program is in text description in java language.
What is a program array?Array programming in computer science refers to methods that allow operations to be applied to a whole set of values at once. This kind of solution is frequently used in scientific and engineering settings.
Shape.java
public abstract class Shape { private int sides;
public Shape() {
this.sides=0;
}
public Shape(int sides) { super(); this.sides = sides;
}
public int getSides() { return sides;
}
public void setSides (int sides) { this.sides = sides;
}
public abstract double calcArea();
Override
public String toString() {
return "This Shape has [sides=" + sides + "]";
Therefore, the program array is given above.
To learn more about program array, refer to the link:
https://brainly.com/question/13104121
#SPJ2
The web design teams of a company are working on designing websites for various companies, Pick the ideas that employ proper use of
metaphor.
Danny is creating a website for senior citizens that uses large fonts to improve accessibility. Keenan is working on a website for school children
learning chemistry that is designed to look like a chemistry lab. Justin has created a website for a flower bouquet manufacturer that shows all
the available types of bouquets. Adam has designed a website for viewing movie trailers for the local cinema that display the video on a screen
made to look like a drive-in theater. Paul has created a website for pre-school children to learn English using very simple language and small
words.
Answer:
C
Explanation:
I KNOW ITS RIHGHT
Answer:
1. Keenan is working on a website for school children learning chemistry that is designed to look like a chemistry lab. 2. Adam has designed a website for viewing movie trailers for the local cinema that display the video on a screen made to look like a drive-in theater
Explanation: 5/5 on the test
6-Write a BNF description of the precedence and associativity rules defined for the expressions in Problem 9 - chapter 7 of the textbook . Assume the only operands are the names a,b,c,d, and e.
The BNF description, or BNF Grammar, of the precedence and associativity rules are
[tex]<identifier>\text{ }::=a|b|c|d|e[/tex]
[tex]<operand>\text{ }::=\text{ }NUMBER\text{ }|\text{ }<Identifier>[/tex]
[tex]<factor>\text{ }::=\text{ }<operand>|\text{ }-<operand>|\text{ }(<expression>)[/tex]
[tex]<power>\text{ }:=\text{ }<factor>\text{ }|\text{ }<factor>\text{**} <power>[/tex]
[tex]<term>\text{ }::=\text{ }<power>\text{ }\\|\text{ }<term>*<power>\text{ }\\|\text{ }<term>/<power>\\\\<expression>\text{ }::=\text{ }<term>\text{ }\\|\text{ }<expression>+<term>\text{ }\\|\text{ }<expression>-<term>[/tex]
BNF, or Backus-Naur Form, is a notation for expressing the syntax of languages. It is made up of a set of derivation rules. For each rule, the Left-Hand-Side specifies a nonterminal symbol, while the Right-Hand-side consists of a sequence of either terminal, or nonterminal symbols.
To define precedence in BNF, note that the rules have to be defined so that:
A negation or bracket matches first, as seen in the nonterminal rule for factorA power matches next, as seen in the rule defining a factorA multiplication, or division expression matches next, as seen in the rule defining a termFinally, addition, or subtraction match, as seen in the rule defining an expression.To make sure that the expression is properly grouped, or associativity is taken into account,
Since powers associate to the right (that is, [tex]x \text{**} y\text{**}z=x \text{**} (y\text{**}z)\text{ and not }(x \text{**} y)\text{**}z[/tex]), the rule defining power does this[tex]<power>\text{ }:=\text{ }<factor>\text{ }|\text{ }<factor>\text{**} <power>[/tex]
and not
[tex]<power>\text{ }:=\text{ }<factor>\text{ }|\text{ }<power>\text{**}<factor>[/tex]
Since multiplication/division are left associative (that is, [tex]x \text{*} y\text{*}z=(x \text{*} y)\text{*}z[/tex]), the rule defining a term takes this into account by specifying its recursion on the right of the operators like so;[tex]<term>\text{ }::=\text{ }<power>\text{ }\\|\text{ }<term>*<power>\text{ }\\|\text{ }<term>/<power>[/tex]
Also, addition and subtraction are left associative (that is, [tex]x \text{+} y\text{+}z=(x \text{+} y)\text{+}z[/tex]), the rule defining an expression takes this into account as seen below[tex]<expression>\text{ }::=\text{ }<term>\text{ }\\|\text{ }<expression>+<term>\text{ }\\|\text{ }<expression>-<term>[/tex]
Learn more about BNF grammars here: https://brainly.com/question/13668912
Without proper synchronization, which is possible, a deadlock, corrupted data, neither or both? Give reasons for your answer.
need answer pls
Without proper synchronization, corrupted data is possible due to the fact that a shared datum can be accessible by multiple processes.
Data synchronization simply means the idea of keeping multiple copies of dataset in coherence with one another in order to maintain data integrity. It's the process of having the same data in two or more locations.
Without proper synchronization, corrupted data is possible because a shared datum could be accessed by multiple processes without mutual exclusive access.
Read related link on:
https://brainly.com/question/25640052
3. Elaborate why and how you use “Output” command in Python Programming Language, write the syntax of output command?
Answer:
Explanation:
you use print() to output something
so it would be like this:
print("What is up, gamer?")
so the syntax is print() with whatever is in the parentheses being what you want to output
g The reduced ISA consists of four instructions: What are those instructions and what does each instruction do
The ISA is run by some set of instructions. This instructions are;
1. Arithmetic: This Instructions perform various Arithmetic functions
2. Logical: This instruction often carryout Logical operations on one or more operands.
3. Data transfer: This handles the transfer of instructions from memory to the processor registers and then backward process again.
4. Flow control: These instructions helps in breaking the sequential flow of instructions and jumping to instructions at different locations.
Instruction set is simply known to be a full combination /number of instructions that are understood by a CPU.
It is know as a machine code that is often written in binary, and shown by assembly language.
Learn more from
https://brainly.com/question/22740965
In a _____, there is no skipping or repeating instructions. A. iteration B. sequence C. selection D. conditional
Answer:
B: Sequence.
Explanation:
identify another natural cyclic event, other than phases and eclipses, that is caused by the moon's gravitational pull on earth
Answer:
TEKS Navigation
Earth Rotation.
Moon Phases.
Tides.
Cyclical events happen in a particular order, one following the other, and are often repeated: Changes in the economy have followed a cyclical pattern. an example would be pamdemic and vircus it is belived that a new pamdemic starts every 100 years.
Explanation:
The rise and fall of ocean tides is the natural cyclic event caused by the moon's gravitational pull on earth
The gravitational pull of the moon's causes the two bulges of water on the Earth's oceans:
where ocean waters face the moon and the pull is strongestwhere ocean waters face away from the moon and the pull is weakestIn conclusion, the rise and fall of ocean tides is the natural cyclic event caused by the moon's gravitational pull on earth
Read more about gravitational pull
brainly.com/question/856541
Write a program that lists all ways people can line up for a photo (all permutations of a list of strings). The program will read a list of one word names (until -1), and use a recursive method to create and output all possible orderings of those names separated by a comma, one ordering per line.
The solution is the recursive Python 3 function below:
########################################################
def allNamePermutations(listOfNames):
# return all possible permutations of listOfNames
if len(listOfNames) == 0 or len(listOfNames) == 1:
# base case
return [listOfNames]
else:
# recursive step
result_list = [ ]
remaining_items = [ ]
for firstName in listOfNames:
remaining_items = [otherName for otherName in listOfNames if
(otherName != firstName)]
result_list += concat(firstName,
allNamePermutations(remaining_items))
return result_list
#######################################################
How does the above function work?
As with all recursive functions, this one also has a base case, and a recursive step. The base case tests to make sure the function terminates. Then, it directly returns a fixed value. It does not make a recursive call.
In the case of this function, the base case checked listOfNames to see if it was empty or only had one name. If any of the conditions were satisfied, a new list containing listOfNames is returned.
The recursive step is where the function allNamePermutations() calls itself recursively. The recursive step handles the case where listOfNames has more than one item. This step first iterates over each name in listOfNames, and then does the following;
Gets a name in listOfNameGets a list of other names in listOfNamesCalls allNamePermutations() on the list of other names to get a list of permutation of the other names.(By first getting the list of other names before passing it into
allNamePermutations(), we make sure the recursive step eventually
terminates. This is because we are passing a smaller list each time
we make the recursive call.)
Inserts the current name in front of each permutationAdds the results to the result list to be returned laterAfter the iteration, it returns the result list which will now contain all permutations of the names in the list.
The concat function is defined below
##################################################
def concat(name, listOfNameLists):
# insert name in front of every list in listOfNameLists
result_list = [ ]
for nameList in listOfNameLists:
nameList.insert(0, name)
result_list.append(nameList)
return result_list
#####################################################
If we run the sample test case below
####################################
name_list = ['Adam', 'Barbara', 'Celine']
allNamePermutations(name_list)
####################################
the following output is produced
[['Adam', 'Barbara', 'Celine'],
['Adam', 'Celine', 'Barbara'],
['Barbara', 'Adam', 'Celine'],
['Barbara', 'Celine', 'Adam'],
['Celine', 'Adam', 'Barbara'],
['Celine', 'Barbara', 'Adam']]
For another example of how to use recursion in Python, see the following example in the link below
https://brainly.com/question/17229221
What is the full form of MPEG? The full form of MPEG is blank.
Answer:
Moving Picture Experts Group
Explanation:
Answer:
The full form of MPEG is Moving Picture Experts Group.
Explanation:
MPEG is a group of working experts to determine video or audio encoding and transmitting specifications/standards.
In your own words, explain the process undertaken while testing the significance of a multiple linear regression model parameter Indicating clearly the hypothesis considered, test statistics used rejection criteria and conclusion.
Which tab must be enabled to access the VBA Editor?
O Developer
O Insert
O Review
O View
The answer to your question is Developer.
What type of rules specify user privileges to select, insert, update, and delete data for different tables and views
Based on SQL analysis, the type of rules that specify user privileges to select, insert, update, and delete data for different tables and views is called DML.
What is DML Command in MySql?DML is an acronym for Data Manipulation Language.
DML commands are typically applied to make all changes in the SQL database.
Different types of DML Commands InsertDeleteUpdateHence, in this case, it is concluded that the correct answer is "DML (Data Manipulation Language)."
Learn more about SQL commands here: https://brainly.com/question/25694408
Develop an algorithm and draw a flowchart to determine and input number is palindrome or not.
Think up and write down a small number of queries for a web search engine.
Make sure that the queries vary in length (i.e., they are not all one word). Try
to specify exactly what information you are looking for in some of the queries.
Run these queries on two commercial web search engines and compare the top
10 results for each query by doing relevance judgments. Write a report that answers at least the following questions: What is the precision of the results? What
is the overlap between the results for the two search engines? Is one search engine
clearly better than the other? If so, by how much? How do short queries perform
compared to long queries?
In which wireless configuration type do nodes communicate directly with each other, rather than with an access point?
1)802.11b
2)Mesh network
3)Ad-hoc
4)2.4Ghz
Ad-hoc
Explanation:
In which wireless configuration type do nodes communicate directly with each other, rather than with an access point? In an AD-HOC network, all nodes communicate and transmit directly to each other.
A programmer will typically write a(n) _____ and pass it to the interpreter. Group of answer choices object method variable script
Answer:
Script
Explanation:
A set of code blocks which is written to solve a particular problem in a certain programming language and passed to the interpreter to run is called a script.
The script is program's body which is made up of codes written in accordance to the syntax of a certain programming language. In other to execute the program written, it has to be passed to the interpreter, which run the script and produces an output.Hence, the set of code written by a programmer is called the script.
Learn more :https://brainly.com/question/14364607
If ClassC is derived from ClassB which is derived from ClassA, this would be an example of ________.
Answer:
Inheritance
Explanation:
what is the different sheets in excel
Answer:
By clicking the sheet tabs at the bottom of the Excel window, you can quickly select one or more sheets. To enter or edit data on several worksheets at the same time, you can group worksheets by selecting multiple sheets. You can also format or print a selection of sheets at the same time.
Explanation:
hope this helps
What was the goal of the COMPETES Act of 2007?
Simply put, the goal was, "To invest in innovation through research and development, and to improve the competitiveness of the United States."
Answer:
Increasing federal investment in scientific research to improve U.S. economic competitiveness.
Explanation:
Hope this helps!
Consider the following class. public class ClassicClass { private static int count = 0; private int num; public ClassicClass() { count++; num = count; } public String toString() { return count + " " + num; } } What is printed when the following code in the main method of another class is run? ClassicClass a = new ClassicClass(); ClassicClass b = new ClassicClass(); ClassicClass c = new ClassicClass(); System.out.println(a + ", " + b + ", " + c);
The the code in the main method is run, it will print
"3 1, 3 2, 3 3"
The static/class field count stores the number of instances of the class created. count is always incremented when the instance constructor is called.
The instance field num acts like an identifier/serial number for the instance created. When the constructor is called, the current count is stored in the num field of the instance.
Each instance's toString( ) method will output the total count (from count) and the serial of the instance (from num).
When the code runs in the main method, it creates three instances (making count==3), so that we have
a = {count: 3, num: 1}b = {count: 3, num: 2}c = {count: 3, num: 3}and implicitly calls toString( ) in the println method for each of the three instances to produce the following output
"3 1, 3 2, 3 3"
Learn more about programs here: https://brainly.com/question/22909010
Which two are computing devices? (Choose two)
A. Unix
B. Laptop
C. Server
D. Mac OS
Answer:
ANS is no.B and no. C
hope it helps
Imagine that you have an image that is too dark or too bright. Describe how you would alter the RGB settings to brighten or darken it. Give an example.
Write a function predict_wait that takes a duration and returns the predicted wait time using the appropriate regression line, depending on whether the duration is below 3 or greater than (or equal to) 3.
The appropriate function which could be used to model the scenario can be written thus ; The program is written in python 3 ;
y = 3x + 3.5
#since no data is given ; using an hypothetical regression equation expressed in slope - intercept format ; where, x = duration and y = Predicted wait time.
def predict_wait(x) :
#initialize a function named predict_wait and takes in a certain duration value, x
y = 3*x + 3.5
#input the x - value into the regression equation to calculate y
return y
#return y
Learn more : https://brainly.com/question/25556810
1. Where did the Industrial Revolution start and why did it begin there?
Answer:
The first Industrial Revolution began in Great Britain in the mid-to-late 1700s, when innovation led to goods being produced in large quantities due to machine manufacturing.
This process began in Britain in the 18th century and from there spread to other parts of the world. Although used earlier by French writers, the term Industrial Revolution was first popularized by the English economic historian Arnold Toynbee (1852–83) to describe Britain's economic development from 1760 to 1840.
Answer:
This process began in Britain in the 18th century and from there spread to other parts of the world. Although used earlier by French writers, the term Industrial Revolution was first popularized by the English economic historian Arnold Toynbee (1852–83) to describe Britain’s economic development from 1760 to 1840
Historians have identified several reasons for why the Industrial Revolution began first in Britain, including: the effects of the Agricultural Revolution, large supplies of coal, geography of the country, a positive political climate, and a vast colonial empire.
Explanation:
HOW TO DISCONNECT A MONITOR FROM A SYSTEM UNIT
Answer: 1. Use the Windows key + P keyboard shortcut.
2. Using the “Project” flyout, select the PC screen only option.
3. Open Settings.
Click on Display.
Under the “Select and rearrange displays” section, select the monitor that you want to disconnect.
Select monitor on Windows 10
Under the “Multiple displays” section, use the drop-down menu and select the Disconnect this display option.
Write an inheritance hierarchy for classes Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. Use Quadrilateral as the superclass of the hierarchy. Create and use a Point class to represent the points in each shape. Make the hierarchy as deep (i.e., as many levels) as possible. Specify the instance variables and methods for each class. The private instance variables of Quadrilateral should be the x-y coordinate pairs for the four endpoints of the Quadrilateral. Write a program that instantiates objects of your classes and outputs each object‟s area (except Quadrilateral
Answer:
CODE:
public class QuadrilateralTest {
public static void main(String[] args) {
// NOTE: All coordinates are assumed to form the proper shapes
// A quadrilateral is a four-sided polygon
Quadrilateral quadrilateral =
new Quadrilateral(1.1, 1.2, 6.6, 2.8, 6.2, 9.9, 2.2, 7.4);
// A parallelogram is a quadrilateral with opposite sides parallel
Parallelogram parallelogram =
new Parallelogram(5.0, 5.0, 11.0, 5.0, 12.0, 20.0, 6.0, 20.0);
// A rectangle is an equiangular parallelogram
Rectangle rectangle =
new Rectangle(17.0, 14.0, 30.0, 14.0, 30.0, 28.0, 17.0, 28.0);
// A square is an equiangular and equilateral parallelogram
Square square =
new Square(4.0, 0.0, 8.0, 0.0, 8.0, 4.0, 4.0, 4.0);
System.out.printf(
"%s %s %s %s\n", quadrilateral, parallelogram,
rectangle, square);
}
}
RESULT:
Coordinates of Quadrilateral are:
2 (1.1, 1.2), (6.6, 2.8), (6.2, 9.9), (2.2, 7.4)
3
4 Coordinates of Parallelogram are:
5 (5.0, 5.0), (11.0, 5.0), (12.0, 20.0), (6.0, 20.0)
6 Width is: 6.0
7 Height is: 15.0
8 Area is: 90.0
9
10 Coordinates of Rectangle are:
11 (17.0, 14.0), (30.0, 14.0), (30.0, 28.0), (17.0, 28.0)
12 Width is: 13.0
13 Height is: 14.0
14 Area is: 182.0
15
16 Coordinates of Square are:
17 (4.0, 0.0), (8.0, 0.0), (8.0, 4.0), (4.0, 4.0)
18 Side is: 4.0
19 Area is: 16.0
Explanation:
In this exercise we have to use the knowledge of computational language in JAVA, so we have that code is:
It can be found in the attached image.
So, to make it easier, the code in JAVA can be found below:
public class QuadrilateralTest {
public static void main(String[] args) {
new Quadrilateral(1.1, 1.2, 6.6, 2.8, 6.2, 9.9, 2.2, 7.4);
new Parallelogram(5.0, 5.0, 11.0, 5.0, 12.0, 20.0, 6.0, 20.0);
new Rectangle(17.0, 14.0, 30.0, 14.0, 30.0, 28.0, 17.0, 28.0);
new Square(4.0, 0.0, 8.0, 0.0, 8.0, 4.0, 4.0, 4.0);
System.out.printf(
"%s %s %s %s\n", quadrilateral, parallelogram,rectangle, square);
}
}
See more about JAVA at brainly.com/question/2266606
If you will choose among the multimedia mentioned, what will you use to promote this advocacy: Stop strand discrimination. We are all equal.
The media that I would choose to promote the arrest of discrimination would be television, radio, newspaper, and social media.
When we want to transmit a message to many people, the most appropriate thing is to use mass media, that is, media that have a large coverage of people, such as:
TVRadioNewspapers
On the other hand, in recent years people can expose their ideas or disseminate information through social networks, because their messages can become a trend among people and have an even greater reach than conventional media.
Another positive aspect of social networks is that they reach a greater diversity of people with different characteristics such as:
ReligionPolitical positionSocioeconomic positionEducational levelAgeSexBirthplaceTherefore, to spread an anti-discrimination message the best option is to spread it through mass media such as television, radio, newspapers and social networks.
Learn more in: https://brainly.com/question/23228635
Edhesive 4.3 code practice question 2
a leading global vendor Of computer software hardware for computer mobile and gaming systems and cloud services it's corporate headquarters is located in Redmond Washington and it has offices in more then 60 countries
Which One Is It
A) Apple
B) Microsoft
C) IBM
D) Global Impact
Answer:
B
Explanation:
They have offices in Redmond Washington
Write a function named parts that will take in as parameters the dimensions of the box (length, width, and height) and the radius of the hole, and returns the volume of material remaining. Assume the hole has been drilled along the height direction. Note: first write the function assuming the hole has radius less than min(length/2, width/2). For full credit, you will need to account for larger radii (bigger than half the length or width of the box).
The function in Python where comments are used to explain each line is as follows:
#This defines the parts() function
def parts(length, width, height, radius):
#This calculates the volume of the box
VBox = length * width * height
#This calculates the volume of the hole
VHole = 3.142 * radius ** 2 * height
#This calculates the remaining volume
Volume = VBox - VHole
#This returns the volume of the remaining material
return Volume
The above program is a sequential program, and it does not require loops, iterations and conditions.
Read more about similar programs at:
https://brainly.com/question/13971394