Q3 GIVEN THE TREND EQUATION NO OF STUDENTS-3000+200 YEAR BASE: 2003-0
1.INTERPRET EQUATION RESULTS 2.FORECAST FOR 2020 3.WHEN WILL THE NO OF
STUDENTS REACH 6000
Solution
x no of years from 2003 y no of students y = 3000+200x 1) The regression
equation has a positive slope of 200 y intercept is 3000 i.e. no of students in the year 2000
Thus for every year 200 students increase 2) For 2020, x = 17, y = 3000+200(17) = 6400
3) When y =6000, 6000 = 3000+200x or x = 15 Hence in year 2018 students reach 6000
B Regression C D. All the above.
OXUS 20 is pleased to offer PART I of Java Programming Questions and Answers with details explanation to support the educational needs and hoping these series help and benefit Computer Science student, IT professionals and those who eager to learn programming and in particular Java Programming...
Spring 2014 CSCI 111 Final exam of 1 61. (2 points) Fl.docxrafbolet0
Spring 2014 CSCI 111 Final exam � of �1 6
1. (2 points) Flip over this test. On the back of this test write your name in the upper, left-hand
corner.
2. (2 points) What are the four parts of the compiling process (just give me 4 words, not a
paragraph).
3. (4 points) Which of the four steps of the compiling process occurs only once, regardless of
the number of source files your application has?
4. (4 points) Write a line of code that causes the preprocessor to generate an error.
5. (4 points) Write a line of code that causes the compiler to generate an error.
6. (5 points) Describe how you could incorrectly compile the joust project to cause the linker to
generate an error.
7. (5 points) Given:
1 float* fp;
2 //...
3 float pi;
4 pi=*(314 + fp);
Rewrite line 4 using array subscript notation.
Spring 2014 CSCI 111 Final exam � of �2 6
8. (5 points) Given:
1 float arr[100];
2 for(int x=0; x<100; ++x)
3 arr[x]=100-x;
What does the following expression print out?
cout << *arr << endl;
9. (14 points) Given:
int a=0;
int b=6;
int x=0;
Circle each if-expression that evaluates to true:
A) if(b)
B) if(x)
C) if(a=b==6)
D) if(a=b==5)
E) if(a=b=5)
F) if(a=x=0)
G) if(a=x==0)
Spring 2014 CSCI 111 Final exam � of �3 6
10. (10 points) Given:
1 #include<iostream>
2 using namespace std;
3
4 int main()
5 {
6 int x;
7 cout << "Enter a number greater than 10" << endl;
8 while ( x < 10 )
9 {
10 cin >> x;
11 }
12 return 0;
13 }
This program compiles just fine, and sometimes it runs as expected. But sometimes when you
run it, it exits immediately after printing "Enter a number greater than 10". That is, the program
doesn't pause for you to enter a number. Why are you getting this inconsistent behavior?
11. (4 points) What is the output of the following:
int x=4;
int y=3;
A) cout << x / y << endl;
B) cout << x % y << endl;
C) cout << x << "%" << y << endl;
D) cout << "x" << '%' << 'y' << endl;
Spring 2014 CSCI 111 Final exam � of �4 6
12. (16 points) What is the type of the expression. That is, what is the kind of thing that each
expression evaluates to. For example:
3 + 4 integer
You may assume that the variable a has been declared as an integer.
A. a + 4
B. a = 4
C. 3.14 + 4.49
D. 3 + 3.14
E. 'a'
F. cout << a
G. new float[30]
H. new float
Spring 2014 CSCI 111 Final exam � of �5 6
13. (5 points) Write a for-loop that prints out the numbers between 1 and 100 that are evenly
divisible by three.
14. (5 points) Write a while-loop that prints out the numbers between 1 and 100 that are evenly
divisible by three.
15. (5 points) Write a do-while-loop that prints out the numbers between 1 and 100 that are
evenly divisible by three.
Spring 2014 CSCI 111 Final exam � of �6 6
16. (10 points) Given:
1 #include<iostream>
2
3 class Willow {
4 publi.
WAP to create equivalent of a four function calculator. The program requires the user to enter two numbers and an operator. It then carries out the specified arithmetic operation: addition, subtraction, multiplication and division of two numbers.(using nested if statement)
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Udayan Khattry
Assess your preparation with these Practice Test Questions with Explanation. Questions are Extracted from Highest Rated Course on Udemy which has helped a lot of students to pass the exam with good score.
500+ multiple choice questions with explanation to assess Oracle Certified Associate, Java SE 8 Programmer II preparation.
Highest Rated course on UDEMY
Read the students success stories at:
https://udayankhattry.com/ocp/
Enroll now to receive maximum discount on the course ie. for just $9.99 or ₹640.00, click the link below- https://www.udemy.com/java-ocp/?couponCode=UDAYANKHATTRY.COM
To avail maximum discount on all courses visit: www.udayankhattry.com
Modify your solution for PLP04 to allow the user to choose the shape.pdfhullibergerr25980
Modify your solution for PLP04 to allow the user to choose the shape to compute and report. The
change should make the \"look and feel\" of the program cleaner and the user experience less
cumbersome. There are several selection structure implementations (if-else, switch) that can be
used in the solution. The user should be provided with a \"menu of choices\" that will allow them
to identify the shape they wish to work with. A typical session might look like this:
Choose the shape
1. Square
2. Rectangle
3. Circle
4. Triangle
5. Quit
Enter your choice: 1
Enter the side (as a decimal): 10.5
The area is 110.25
The perimeter is: 42.0
Thank you
Procedure:
Locate your PLP04.java source file in your files and edit with Eclipse.
Add the comment // modified by: ... and supply your name and the current date.
Save the program with the file name xxPLP05.java where xx are your initials. Be sure to change
the class name to this as well (to avoid the run-time error \"class not found\" message).
Modify the program as indicated in the Problem Statement above.
Compile the program and correct any syntax errors detected by the compiler.
When the syntax errors have been corrected, test the program in Eclipe. Before testing, on paper,
create test data and perform the computations manually. These will serve as your control for
testing.
Compare the results produced by your program with your hand derived results.
Using the commenting facility, put your test data at the end of the program file.
Notes:
Modify your copy of PLP04.java for this assignment. The original should be stored on your
flashdrive.
Use the same \"prompt and respond\" dialog from your version of PLP04.java to collect the data
and report the results for each of the other three shapes. A refresher:
Should the user choose the rectangle (2):
Enter the first side (as a decimal): 10.5
Enter the second side (as a decimal): 15.5
The area is 162.75
The perimeter is: 52.0
Should the user choose the circle (3)
Enter the radius (decimal): 30.2
The area is:2,865.2557
The circumference is: 189.752
Should the user choose the triangle:
Enter the height of the triangle (decimal): 3.0
Enter the base of the triangle (decimal): 4.0
The area is: 6.0
The perimeter is 12.0
When deciding on the data type to use for your sides (rectangle), radius (circle), base and height
(triangle) consider how you will use them and the numeric types that will be used in the
computations.
Declare PI as a named constant and assign it the value of 3.14159 at the time of declaration.
Notice that the example above strongly suggests that your program will require a series of
interactions with the user in order to gather data for each set of shape calculations.
Assume you will be working with a right triangle (a triangle of 90 degrees).
Some calculations you may find useful:
for the perimeter of a rectangle:
perimeter = 2 * (side1 + side2)
for the circumference of a circle:
circumference = 2 * PI * radius
for the perimeter of a triangle:
perimet.
OCJP Samples Questions: Exceptions and assertionsHari kiran G
Are you a Java enthusiast and preparing for Java 8 certification exam (OCP Java SE 8)? Try out this Quiz on Exceptions and Assertions
This quiz has answers with detailed explanation.
If the sample means are different from the population mean, what do .pdfmayorothenguyenhob69
I have a generator and I need a wheel that is going to start the generator. How I know the
diameter of the wheel that I need to start the engine. The require rpm for start of the generator is
3480-3780.
Solution
Basically there are many ways to get the dia of wheel but one method is by using the flywheel of
corresponding power the flwheel size define the wheel size of the used in generator by using the
fluctuation in speed as given.
How would you define the Wilcoxon Signed Rank TestSolutionThe.pdfmayorothenguyenhob69
Hey guys please I need help with problem 9.87
Thank you, 9.86 Public Policy and Political Science Residential mail boxes in Des Moines, Iowa,
should be installed such that the bottom of the mailbox is 42 inches above the ground. This rule
is designed for safety and to accommodate short mail carriers. A random sample of 75 mailboxes
in the city was selected. The height of each was carefully measured, and the sample mean was
43.22 inches. Assume o- = 7.6 inches and use a = 0.05. Is there any evidence to suggest the true
mean height of mailboxes in Des Moines is different from 42 inches? 9.87 Public Health and
Nutrition Iodine is an important nutri ent for the human body, especially in hormone
development. Milk is a natural source of iodine, and the mean amount in cow?s milk is 88
,Mug/250ml^24 Milk from organic farms is reported to have a lower concentration of elements
such as zinc, iodine, and selenium. A random sample of 35 gallons of organic milk from
Humboldt County, California, was obtained and the iodine concentration was measured in each.
The sample mean was 86.5. Assume sigma = 3.4. Is there any evidence to suggest that the mean
iodine concentration in organic milk is less than 88? Use a = 0.01.
Solution
Formulating the null and alternative hypotheses,
Ho: u >= 88
Ha: u < 88
As we can see, this is a left tailed test.
Thus, getting the critical z, as alpha = 0.01 ,
alpha = 0.01
zcrit = - 2.326347874
Getting the test statistic, as
X = sample mean = 86.5
uo = hypothesized mean = 88
n = sample size = 35
s = standard deviation = 3.4
Thus, z = (X - uo) * sqrt(n) / s = -2.610035198
Also, the p value is
p = 0.004526645
As |z| > 2.326, and P < 0.01, we REJECT THE NULL HYPOTHESIS.
Thus, there is significant evidence that the mean iodine concentration in organic milk is less
than 88. [CONCLUSION].
More Related Content
Similar to Review Questions for Exam 10182016 1. public class .pdf
OXUS 20 is pleased to offer PART I of Java Programming Questions and Answers with details explanation to support the educational needs and hoping these series help and benefit Computer Science student, IT professionals and those who eager to learn programming and in particular Java Programming...
Spring 2014 CSCI 111 Final exam of 1 61. (2 points) Fl.docxrafbolet0
Spring 2014 CSCI 111 Final exam � of �1 6
1. (2 points) Flip over this test. On the back of this test write your name in the upper, left-hand
corner.
2. (2 points) What are the four parts of the compiling process (just give me 4 words, not a
paragraph).
3. (4 points) Which of the four steps of the compiling process occurs only once, regardless of
the number of source files your application has?
4. (4 points) Write a line of code that causes the preprocessor to generate an error.
5. (4 points) Write a line of code that causes the compiler to generate an error.
6. (5 points) Describe how you could incorrectly compile the joust project to cause the linker to
generate an error.
7. (5 points) Given:
1 float* fp;
2 //...
3 float pi;
4 pi=*(314 + fp);
Rewrite line 4 using array subscript notation.
Spring 2014 CSCI 111 Final exam � of �2 6
8. (5 points) Given:
1 float arr[100];
2 for(int x=0; x<100; ++x)
3 arr[x]=100-x;
What does the following expression print out?
cout << *arr << endl;
9. (14 points) Given:
int a=0;
int b=6;
int x=0;
Circle each if-expression that evaluates to true:
A) if(b)
B) if(x)
C) if(a=b==6)
D) if(a=b==5)
E) if(a=b=5)
F) if(a=x=0)
G) if(a=x==0)
Spring 2014 CSCI 111 Final exam � of �3 6
10. (10 points) Given:
1 #include<iostream>
2 using namespace std;
3
4 int main()
5 {
6 int x;
7 cout << "Enter a number greater than 10" << endl;
8 while ( x < 10 )
9 {
10 cin >> x;
11 }
12 return 0;
13 }
This program compiles just fine, and sometimes it runs as expected. But sometimes when you
run it, it exits immediately after printing "Enter a number greater than 10". That is, the program
doesn't pause for you to enter a number. Why are you getting this inconsistent behavior?
11. (4 points) What is the output of the following:
int x=4;
int y=3;
A) cout << x / y << endl;
B) cout << x % y << endl;
C) cout << x << "%" << y << endl;
D) cout << "x" << '%' << 'y' << endl;
Spring 2014 CSCI 111 Final exam � of �4 6
12. (16 points) What is the type of the expression. That is, what is the kind of thing that each
expression evaluates to. For example:
3 + 4 integer
You may assume that the variable a has been declared as an integer.
A. a + 4
B. a = 4
C. 3.14 + 4.49
D. 3 + 3.14
E. 'a'
F. cout << a
G. new float[30]
H. new float
Spring 2014 CSCI 111 Final exam � of �5 6
13. (5 points) Write a for-loop that prints out the numbers between 1 and 100 that are evenly
divisible by three.
14. (5 points) Write a while-loop that prints out the numbers between 1 and 100 that are evenly
divisible by three.
15. (5 points) Write a do-while-loop that prints out the numbers between 1 and 100 that are
evenly divisible by three.
Spring 2014 CSCI 111 Final exam � of �6 6
16. (10 points) Given:
1 #include<iostream>
2
3 class Willow {
4 publi.
WAP to create equivalent of a four function calculator. The program requires the user to enter two numbers and an operator. It then carries out the specified arithmetic operation: addition, subtraction, multiplication and division of two numbers.(using nested if statement)
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Udayan Khattry
Assess your preparation with these Practice Test Questions with Explanation. Questions are Extracted from Highest Rated Course on Udemy which has helped a lot of students to pass the exam with good score.
500+ multiple choice questions with explanation to assess Oracle Certified Associate, Java SE 8 Programmer II preparation.
Highest Rated course on UDEMY
Read the students success stories at:
https://udayankhattry.com/ocp/
Enroll now to receive maximum discount on the course ie. for just $9.99 or ₹640.00, click the link below- https://www.udemy.com/java-ocp/?couponCode=UDAYANKHATTRY.COM
To avail maximum discount on all courses visit: www.udayankhattry.com
Modify your solution for PLP04 to allow the user to choose the shape.pdfhullibergerr25980
Modify your solution for PLP04 to allow the user to choose the shape to compute and report. The
change should make the \"look and feel\" of the program cleaner and the user experience less
cumbersome. There are several selection structure implementations (if-else, switch) that can be
used in the solution. The user should be provided with a \"menu of choices\" that will allow them
to identify the shape they wish to work with. A typical session might look like this:
Choose the shape
1. Square
2. Rectangle
3. Circle
4. Triangle
5. Quit
Enter your choice: 1
Enter the side (as a decimal): 10.5
The area is 110.25
The perimeter is: 42.0
Thank you
Procedure:
Locate your PLP04.java source file in your files and edit with Eclipse.
Add the comment // modified by: ... and supply your name and the current date.
Save the program with the file name xxPLP05.java where xx are your initials. Be sure to change
the class name to this as well (to avoid the run-time error \"class not found\" message).
Modify the program as indicated in the Problem Statement above.
Compile the program and correct any syntax errors detected by the compiler.
When the syntax errors have been corrected, test the program in Eclipe. Before testing, on paper,
create test data and perform the computations manually. These will serve as your control for
testing.
Compare the results produced by your program with your hand derived results.
Using the commenting facility, put your test data at the end of the program file.
Notes:
Modify your copy of PLP04.java for this assignment. The original should be stored on your
flashdrive.
Use the same \"prompt and respond\" dialog from your version of PLP04.java to collect the data
and report the results for each of the other three shapes. A refresher:
Should the user choose the rectangle (2):
Enter the first side (as a decimal): 10.5
Enter the second side (as a decimal): 15.5
The area is 162.75
The perimeter is: 52.0
Should the user choose the circle (3)
Enter the radius (decimal): 30.2
The area is:2,865.2557
The circumference is: 189.752
Should the user choose the triangle:
Enter the height of the triangle (decimal): 3.0
Enter the base of the triangle (decimal): 4.0
The area is: 6.0
The perimeter is 12.0
When deciding on the data type to use for your sides (rectangle), radius (circle), base and height
(triangle) consider how you will use them and the numeric types that will be used in the
computations.
Declare PI as a named constant and assign it the value of 3.14159 at the time of declaration.
Notice that the example above strongly suggests that your program will require a series of
interactions with the user in order to gather data for each set of shape calculations.
Assume you will be working with a right triangle (a triangle of 90 degrees).
Some calculations you may find useful:
for the perimeter of a rectangle:
perimeter = 2 * (side1 + side2)
for the circumference of a circle:
circumference = 2 * PI * radius
for the perimeter of a triangle:
perimet.
OCJP Samples Questions: Exceptions and assertionsHari kiran G
Are you a Java enthusiast and preparing for Java 8 certification exam (OCP Java SE 8)? Try out this Quiz on Exceptions and Assertions
This quiz has answers with detailed explanation.
If the sample means are different from the population mean, what do .pdfmayorothenguyenhob69
I have a generator and I need a wheel that is going to start the generator. How I know the
diameter of the wheel that I need to start the engine. The require rpm for start of the generator is
3480-3780.
Solution
Basically there are many ways to get the dia of wheel but one method is by using the flywheel of
corresponding power the flwheel size define the wheel size of the used in generator by using the
fluctuation in speed as given.
How would you define the Wilcoxon Signed Rank TestSolutionThe.pdfmayorothenguyenhob69
Hey guys please I need help with problem 9.87
Thank you, 9.86 Public Policy and Political Science Residential mail boxes in Des Moines, Iowa,
should be installed such that the bottom of the mailbox is 42 inches above the ground. This rule
is designed for safety and to accommodate short mail carriers. A random sample of 75 mailboxes
in the city was selected. The height of each was carefully measured, and the sample mean was
43.22 inches. Assume o- = 7.6 inches and use a = 0.05. Is there any evidence to suggest the true
mean height of mailboxes in Des Moines is different from 42 inches? 9.87 Public Health and
Nutrition Iodine is an important nutri ent for the human body, especially in hormone
development. Milk is a natural source of iodine, and the mean amount in cow?s milk is 88
,Mug/250ml^24 Milk from organic farms is reported to have a lower concentration of elements
such as zinc, iodine, and selenium. A random sample of 35 gallons of organic milk from
Humboldt County, California, was obtained and the iodine concentration was measured in each.
The sample mean was 86.5. Assume sigma = 3.4. Is there any evidence to suggest that the mean
iodine concentration in organic milk is less than 88? Use a = 0.01.
Solution
Formulating the null and alternative hypotheses,
Ho: u >= 88
Ha: u < 88
As we can see, this is a left tailed test.
Thus, getting the critical z, as alpha = 0.01 ,
alpha = 0.01
zcrit = - 2.326347874
Getting the test statistic, as
X = sample mean = 86.5
uo = hypothesized mean = 88
n = sample size = 35
s = standard deviation = 3.4
Thus, z = (X - uo) * sqrt(n) / s = -2.610035198
Also, the p value is
p = 0.004526645
As |z| > 2.326, and P < 0.01, we REJECT THE NULL HYPOTHESIS.
Thus, there is significant evidence that the mean iodine concentration in organic milk is less
than 88. [CONCLUSION].
How could global climate change affect vector-borne or zoonotic di.pdfmayorothenguyenhob69
Grade
Freshmen
Sophomore
Junior
Senior
A
0
8
9
10
B
0
6
8
11
C
1
7
9
12
D
2
4
1
4
F
0
6
2
1
TOTAL
3
31
29
38
What is the probability that the student is a junior and makes a B in the course?
What is the probability that the student does not make a A in the course, given that the student is
a senior?
What is the probability that the student makes a 0 or F in the course?
Let A be the event that a sophomore is taking the course. Let B be the event that the student
makes a C in the course. Are the events A and B independent? Are the events A and B mutually
exclusive?
Grade
Freshmen
Sophomore
Junior
Senior
A
0
8
9
10
B
0
6
8
11
C
1
7
9
12
D
2
4
1
4
F
0
6
2
1
TOTAL
3
31
29
38
Solution
here total number of students=3+31+29+38=101
##P[student is junior and scores B]=(total juniors who scores B)/total students=8/101=0.0079
[answer]
##P[a student does not make A in the course given that the student is senior]=P[a senior does not
make A]/P[student is a senior]=((38-10)/101)/(38/101)=28/38=0.73684 [answer]
##P[a student makes F]=total students make F/total students=(0+6+2+1)/101=0.08910 [answer]
##A be the event that a sophomore is taking the course. B be the event that the student makes C
in the course.
so P[A]=31/101 P[B]=(1+7+9+12)/101=29/101
now P[AB]=P[a sopomore makes C]=7/101 which is not eual to P[A]*P[B]
so they are not independent
moreover P[AB] is not zero..so not mutually exclusive also..
How Can Sequence Data Be Used to Track Flu Virus Evolution During Pan.pdfmayorothenguyenhob69
Given the pseudocode below, answer the following questions: Algorithm What (A, n) A
leftarrow 2-dimensional array of n times n integers B leftarrow 1-dimensional array of n integers
for leftarrow n-5 to n-3 do for j leftarrow 0 to n-1 do B[i] leftarrow B[i] + A[i][j] end for end
for What is the Big-O order of the memory required by the algorithm? How many times is the
innermost loop executed, as a function of n? What is the Big-0 order of the operations required
by the algorithm?
Solution
a. Big-O order of memory required = O(n^2) for A and O(n) for B. So result would be O(n^2).
Big-O order of memory required means how much memory is expected to grow as a function of
n. Here, as n increases memory required for A would increase by n^2
b. It is exectued O(2*n) -> O(n)..
Far from being primitive, bacteria have evolved until they are i.pdfmayorothenguyenhob69
Explain what happens from the time of an interrupt request, (i.e., IRQ line is asserted), through
the start of executing an interrupt service routine, and then how control returns to the interrupted
program. Assume that the interrupt request does not occur at the same time as any other interrupt
request. (Note: There are many steps involved, so take your time and be specific.) in ARM
Assembly.
Solution
Answer
From the time of an interrupt request through the start of executing an interrupt service routine
below steps occur:.
E1-1 Reporting Amounts on the Four Basic Financial Statements [LO 1-2.pdfmayorothenguyenhob69
During which part of the EKG does the depolarization of the ventricular anterior aspect and
septum occur?
Select one:
a. T wave
b. Q wave
c. R wave
d. S wave
e. P wave
During the plateau of the ventricular muscle action potential, the membrane potential remains
basically unchanged. The movements of which two ions are mainly responsible?
Select one:
a. Sodium influx, calcium efflux
b. Potassium influx, calcium efflux
c. Potassium efflux, calcium efflux
d. Potassium efflux, calcium influx
e. Potassium influx, calcium influx
f. Potassium influx, sodium efflux
g. Sodium influx, potassium efflux
Solution
Ques-1
Answer: b. Q wave
Reason:
QRS complex is also known as initial ventricular complex, which is produced due to the
ventricular depolarization. Q wave is a negative wave that continues as a positive R wave (tallest
wave). R wave is followed by S wave, which is a negative wave. The EKG with Q wave does the
depolarization of the ventricular anterior aspect and septum occur because it is generated via
downward deflection after P wave. In case lead V1, depolarization meticulously associated with
the ventricular anterior aspect and septum & it is not abnormal if it is missing from any
particular lead, it is significant if its higher than 1 mm wide. It also considered as abnormal if it
is 25% - 33% of total amplitude of the R wave..
Do differentiated cells transform into other type of cells How Wha.pdfmayorothenguyenhob69
discuss the differences between international marketing and global marketing with supporting
details.
Solution
International and global marketing are different in nature
International marketing:imMarketing Decisions are made in the countries and the staff will be
use who got good knowledge about the target markets and positioning strategy
GLOBAL MARKETING: Where as it is treated as whoe world as one market,marketing
activities are co-ordinated and integrated by multiple markets
Common Differntiation.
Define the terms activity, layout, intent, and AVDSolutionACT.pdfmayorothenguyenhob69
Define the terms: activity, layout, intent, and AVD
Solution
ACTIVITY:
An activity can be defined as the application program component that can be used for the users
for any purpose.
An application might have many number of activities.
Inorder to create an activity we must develop subclass of those activities.
LAYOUT:A layout depicts the graphical view of the user interface for an application.
the layout can be declared in any of the two ways those are:
layout can be declared through xml or it can be through in run time.
INTENT: intent itself can be defined as an Intent object as well as it is a passive data structure
containing an abstract depiction of an operation that has to be done.
AVD:ANDROID VIRTUAL DESIGN.
Describe the similarities and differences between IPv4 & IPv6.So.pdfmayorothenguyenhob69
Describe how you would look up the critical z-value for a 72% on a normal curve table, what is
the critical z-value for a 72% confidence interval?
Solution
Za/2 = Z-table value = 1.08
Method 1:
I will use the below formula NORMINV(1-0.28/2,0,1)
Method 2:
To do this, if X ~ N(?, ?^2), then
STEP 1:
Z= X- ? / ? ~ N(0,1)
STEP 2:
A table of standardized normal values, can then be used to obtain an answer in terms of the
converted problem.
STEP 3:
Find x=Z ?+ ?
STEP 4:
Use below method
http://www.mathsisfun.com/data/standard-normal-distribution-table.html
Eg:
TYPE 1: (Z ? 1.65) = F(1.65) = 0.95.
Compare different sexual and asexual life cycles noting their adapti.pdfmayorothenguyenhob69
Compare different sexual and asexual life cycles noting their adaptive advantages.
Solution
Asexual reproduction sexual reproduction Number of organisms involved One parent
needed Two parents are required to mate Cell division Cells divide by Fission, budding , or
regeneration Cells divide by Meiosis Types Budding, vegetative reproduction, fragmentation,
spore formation Syngamy and conjugation Advantages Time Efficient; no need to search for
mate, requires less energy Variation, Unique., organism is more protected Disadvantages No
variation - if the parent has a genetic disease, offspring does too. Requires two organisms,
requires more energy Evolution There is very little chance of variation with asexual
reproduction. Mutations in DNA can still occur but not nearly as frequently as in sexual
reproduction. Sexual reproduction leads to genetic variation in new generations of offspring.
This is fundamental to evolution. Involvement of sex cells No formation or fusion of gametes
(sex cell) Formation and fusion of gametes (sex cell) occurs Found in Lower organisms Higher
invertebrates and all vertebrates Unit of reproduction May be whole parent body or a bud or a
fragment or a single somatic cell Gamete Time taken Asexual reproduction is completed in a
very short period of time. Sexual reproduction can take several months to complete. Number of
offspring Two or more One or more.
BackgroundIn many applications, the composition of a collection o.pdfmayorothenguyenhob69
Background:
In many applications, the composition of a collection of data items changes over time. Not only
are new data items added and existing ones removed, but data items may be duplicated. A list
data structure is a member of the general category of abstract data types called containers, whose
purpose is to hold other objects. In C++, lists are provided in the Standard Template Library.
However, for this assignment you will design and write your own linked list implementation to
support the ADT operations specified below.
Objective:
Design and implement the specifications for a List Abstract Data Type where the items in the list
are unsorted.
Requirements:
Define a list and develop a set of operations for creating and manipulating a list that satisfies the
list ADT specification.
List ADT Specification
Structure: The list elements are of ItemType. The list has a property called the current position
which designates the position of the last element accessed by GetNextItem during an iteration
through the list. Only ResetList and GetNextItem alter the current position.
Definitions (provided by the user):
MAX_ITEMS: A constant specifying the maximum capacity of items allowed on the list
Item Type: Class encapsulating the type of items in the list
RelationType: An enumeration type that consists of LESS, GREATER, EQUAL
Member function of ItemType that must be included:
RelationType ComparedTo(ItemType Item)
Function: Determines the ordering of two ItemType objects based on their keys
Precondition: Self and item have their key members initialized
Postcondition:
Function value = LESS if the key of self is less than the key of item
= GREATER if the key of self is greater than the key of item
= EQUAL if the keys are equal
Operations (provided by Unsorted List ADT)
Make Empty
Function: Initializes list to empty state
Preconditions: None
Postcondition: List is empty
Boolean IsFull
Function: Determines whether list is full
Preconditions: List has been initialized
Postcondition: Function value = (list is full)
int GetLength
Function: Determines the number of elements in list
Preconditions: List has been initialized
Postcondition: Function value = number of elements in list
ItemType GetItem(Item Typeitem, Boolean& found)
Function: Get list element whose key matches item’s key (if present)
Preconditions: List has been initialized
Key member of item is initialized
Postcondition: If there is an element someItem whose keymatches item’s key, then found =
true and copy of someItemis returned; otherwise found = false and item is returned
List is unchanged
PutItem(ItemType item)
Function: Puts item into list
Preconditions: List has been initialized
List is not full
Item is not in list
Postcondition: Item is in the list
DeleteItem(ItemType item)
Function: Deletes the element whose key matches item’s key
Preconditions: List has been initialized
Postcondition: One and only one element in list has a key matching item’s key
ResetList
Function: Initializes current p.
11.25In 2010, there were 117,538,000 households in the United Stat.pdfmayorothenguyenhob69
11.25
In 2010, there were 117,538,000 households in the United States. There were 78,833,000 family
households made up of married couples, single-male households, and single-female households.
To determine how many of each type a survey was undertaken. The results were stored using the
codes 1=married couples, 2=single male, and 3=single female. Estimate with 95% confidence the
total number of American households with married couples. (Adapted from Statistical Abstract
of the United States, 2012, Table 59)
Solution.
Which methodology may be used for detection of incorporated BrdUA.pdfmayorothenguyenhob69
What is the first enzymatic activity in DNA synthesis?
Endonuclease
Primase
Exonuclease
DNA polymerase
LigaseA.
EndonucleaseB.
PrimaseC.
ExonucleaseD.
DNA polymeraseE.
Ligase
Solution
Ans. Correct option. B. Primase.
The first enzymatic activity in DNA synthesis (among the available options) is Primase.
DNA primase (or, primase) binds to ssDNA strands during initiation period. It synthesizes small
RNA primer to both the strands. DNA polymerase holoenzyme binds during elongation of DNA
synthesis after primase has synthesized RNA primers. It extends the RNA primers with DNA
nucleotide polymerization on it in 5’-3’ direction.
The exonuclease activity of DNA polymerase comes into action during repair or nick translation
during elongation. Other than that, no other endonuclease or exonuclease participate DNA
synthesis.
Ligase (DNA ligase) joins DNA fragments during nick translation much later than DNA pol
begins to synthesize DNA..
Which of the following is a difference between lightweight and heavy.pdfmayorothenguyenhob69
What is the probability that a five card poker hand contains the jack of diamonds
and the two of spades?
Solution
Jack of diamonds and the two of spades:
No of ways to get 1 Jack of diamonds: = 1
No of ways to get 2 spades: 13C2 = 78
Total No of ways to contains the jack of diamonds and the two of spades = 1*78 = 78
and No of ways to five card poker hand = 52C5 = 2,598,960
Then Probability = 78/2,598,960 = 0.00003001.
What are the common conditions resulting in thrombocytosis Explain .pdfmayorothenguyenhob69
Use the following information to answer questions 7-11 The following information applies to
the questions displayed below. The following information is available for Lock-Tite Company,
which produces special-order security products and uses a job order costing system. April 30
May 31 Inventories Raw materials Work in process Finlshed goods $39,000 $30,000 9,100
20,500 69,000 34,500 Activities and information for May Raw materials purchases (paid with
cash) Factory payroll (paid with cash) Factory overhead 186,000 300,000 Indirect materials
Indirect labor Other overhead costs 7,000 71,000 111,000 1,100,000 Sales (received in cash)
Predetermined overhead rate based on direct labor cost 55%
Solution
Answer - Exercise 15-7 T-accounts Factory Overheads Cost of material used
Raw Materials Raw Material 7000 125950 Work in process Raw Materials April-30 $39,000
RM-April 30 39000 7000 Factory Overhead Factory Payroll 71000 63050 Cost of goods sold
Add:Raw Material Purchases $186,000 RM Purchases 186000 188000 Work in process Other
Overheads 111000 Less : Raw Materials May-31 $30,000 Cost of material used
$195,000 less : Indirect Material used $7,000 RM May 31 30000 Direct Material
Used $188,000 Work in process Cost of direct labour used = $3,00,000 WIP-
April 30 9100 531550 Finished Goods Raw Material 188000 Cost of goods
Manufactured Factory Payroll 229000 Cost of Materials used $188,000 Factory
Overhead 125950 Cost of direct labour used $229,000 WIP-May 31 20500 Factory
Overhead applied [55% of $2,29,000] $125,950 Cost of Manufacturing for the period
$542,950 Factory Payroll Add: Work in process , April-30 $9,100 Cash 300000 71000
Factory Overheads Less : Work in process,May-31 $20,500 229000 Work in process
Cost of goods Manufactured $531,550 Cost of goods sold Cost of goods
Manufactured $531,550 Add : Finished Goods , April-30 $69,000 Finished Goods
Less : Finished Goods,May-31 $34,500 FG-April 30 69000 Cost of goods sold $566,050
Work in process 531550 566050 Cost of goods sold Gross Profit Sales
$1,100,000 FG May 31 34500 Less : Cost of goods sold (unadjusted) $566,050
Gross Profit $533,950 Overapplied or underapplied overheads = Actual
overheads - applied overheads Actual Overheads = Indirect Material + Indirect Labour +
other overhead costs = $7000 + $71000 + $111000 = $1,89,000 Underapplied overheads =
$189000 -$125950 = $63,050 Journal Entry to allocate underapplied
overheads Account Titles Debit Credit Cost of goods sold $63,050 Factory
Overheads $63,050 Income Statement (Partial) Sales $1,100,000
Cost of goods sold $566,050 Gross Profit $533,950.
What are some differences between the xylem and the phloem Solu.pdfmayorothenguyenhob69
Use Simplex method and solve the following problem:
Maximize p = x+y subject to x+y <= 2, 3x+y >= 4
Which of teh following is the last matrix table?
A.
x y s1 s2 | b
0 1 3/2 1/2 1
1 0 1/2 -1/2 1
0 0 1 0 2
B.
x y s1 s2 | b
0 1 3/2 1/2 1
1 0 -1/2 1/2 1
0 0 1 0 2
C.
x y s1 s2 | b
0 1 3/2 1/2 1
1 0 -1/2 -1/2 1
0 0 1 0 2
D.
x y s1 s2 | b
0 1 3/2 -1/2 1
1 0 -1/2 -1/2 1
0 0 1 0 2
x y s1 s2 | b
0 1 3/2 1/2 1
1 0 1/2 -1/2 1
0 0 1 0 2
B.
x y s1 s2 | b
0 1 3/2 1/2 1
1 0 -1/2 1/2 1
0 0 1 0 2
C.
x y s1 s2 | b
0 1 3/2 1/2 1
1 0 -1/2 -1/2 1
0 0 1 0 2
D.
x y s1 s2 | b
0 1 3/2 -1/2 1
1 0 -1/2 -1/2 1
0 0 1 0 2
Solution
The step by step solution of the problem is given below -
Tableau #1
x y s1 s2 p
1 1 1 0 0 2
3 1 0 -1 0 4
-1 -1 0 0 1 0
Tableau #2
x y s1 s2 p
0 2/3 1 1/3 0 2/3
1 1/3 0 -1/3 0 4/3
0 -2/3 0 -1/3 1 4/3
Tableau #3
x y s1 s2 p
0 1 3/2 1/2 0 1
1 0 -1/2 -1/2 0 1
0 0 1 0 1 2
So, the correct answer is option (c)..
Two families of sloths exist commonly in Central and South America (t.pdfmayorothenguyenhob69
There are a number of highly touted search engines for finding things of interest on the Internet.
Recently, a consumer rating system ranked two search engines ahead of the others. Now, a
computer user\'s magazine wishes to make the final determination regarding which one is
actually better at finding particular information. To do this, each search engine was used in an
attempt to locate specific information using specified keywords. Both search engines were
subjected to 100 queries. Search engine 1 successfully located the information 88 times and
search engine 2 located the information 80 times. Using a significance level equal to 0.05, what
is the critical value for the hypothesis test?
z =
z =
Solution
It is a two-tailed test.
Given a=0.05, the critical values are Z(0.025) = -1.96 or 1.96 (from standard normal table)
Answer: z =.
Two populations of rats are discovered on nearby islands. Describe t.pdfmayorothenguyenhob69
think like an You have three resistors of resistance 30 ohm [Ohm]. There are__configurations
possible, with__unique combinations, resulting in___different resistance values. A
\"configuration\" is a way of combining the resistors. For example, two resistors in parallel is one
configuration; two resistors in series is a second configuration. A \"combination\" is the specific
way of combining given resistors to form an effective resistance. For example, combining
Resistor #1 and #2 in parallel is one combination; combining Resistor #1 and #3 in parallel is a
second combination. These combinations may or may not result in a unique effective resistance.
What is the greatest resistance that can be made from a combination of resistors, and what is the
effective resistance of this combination? What is the least resistance that can be made from a
combination of resistors, and what is the effective resistance of this combination?
Solution
b) GREATEST RESISTANCE CAN BE ACHIEVED THROUGH SERIES CONNECTION OF
THREE RESISTORS.
EFFECTIVE RESISTANCE=30+30+30=90 OHMS
C) LEAST RESISTANCE CAN BE ACHIEVED THROUGH PARALLEL CONNECTION OF
THREE RESISTORS.
EFFECTIVE RESISTANCE=(30*30)/(30+30)=15 OHMS
(15*30)/(15+30)=450/45=10 OHMS.
30-32 Nuclear pores permit the passage of chromosomes outward. glu.pdfmayorothenguyenhob69
30-32 Nuclear pores permit the passage of chromosomes outward. glucose molecules outward.
assembled DNA molecules outward. RNA outward. sodium ions inward, potassium ions
outward. The cell walls of fungi are made from peptidoglycan. pseudomurein. cellulose.
chitin. Starch. Flattened sacks of membranes involved in the packaging and distribution of
molecules synthesized in the cell are known as Golgi bodies. microbodies. pinocytic vesicles.
vacuoles. chromosomes.
Solution
30). RNA outwarrd
This transport includes RNA and ribosomal proteins moving from nucleus to the cytoplasm.
31). Cellulose and chitin
32). Golgi bodies.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Review Questions for Exam 10182016 1. public class .pdf
1. Review Questions for Exam
10/18//2016
1.
public class Question1
{
public static void main(String[ ] args)
{
System.out.print("Here");
System.out.println("There " + "Everywhere");
System.out.println("But not" + "in NJ");
}
}
Write the output after the above program is executed.
2. Consider the following statement:
System.out.println("1 big bad wolft8 the 3 little pigs 4 dinner 2night");
This statement will output ________ lines of text
A) 1
B) 2
C) 3
D) 4
E) 5
public class MyString
{
public static void main(String[] args)
{
2. System.out.print("1 big bad wolft8 the 3 little pigs 4 dinner 2 night");
}
}
3. The word println is a(n)
A) method
B) reserved word
C) variable
D) class
E) String
4. A Java variable is the name of a
5. What output is produced by the following?
System.out.println ("X: " + 25);
System.out.println ("Y: " + (15 + 50));
System.out.println ("Z: " + 300 + 50);
Of the following types, which one cannot store a numeric value?
6. What is output with the statement System.out.println(""+x+y); if x and y are int values
where x=10 and y=5?
public class MyString
{
public static void main(String[] args)
3. {
int x=10;
int y = 5;
System.out.println(""+x+y);
}
}
7. What happens if you attempt to use a variable before it has been initialized?
A. A syntax error may be generated by the compiler
B. A runtime error may occur during execution
C. A "garbage" or "uninitialized" value will be used in the computation
D. A value of zero is used if a variable has not been initialized
E. Answers A and B are correct
8. What is the function of the dot operator?
A. It serves to separate the integer portion from the fractional portion of a floating point number
B. It allows one to access the data within an object when given a reference to the object
C. It allows one to invoke a method within an object when given a reference to the object
D. It is used to terminate commands (much as a period terminates a sentence in English)
E. Both B and C are correct
9. Say you write a program that makes use of the Random class, but you fail to include an
import statement for java.util.Random (or java.util.*). What will happen when you attempt to
compile and run your program.
A. The program won't run, but it will compile with a warning about the missing class.
B. The program won't compile-you'll receive a syntax error about the missing class.
C. The program will compile, but you'll receive a warning about the missing class.
D. The program will encounter a runtime error when it attempts to access any member of the
Random class
4. E. none of the above
10. An API is
A. an Abstract Programming Interface
B. an Application Programmer's Interface
C. an Application Programming Interface
D. an Abstract Programmer's Interface
E. an Absolute Programming Interface
11. When executing a program, the processor reads each program instruction from
12. The main method for a Java program is defined by
13. What will be the result of the following assignment statement? Assume b = 5 and c = 10.
int a = b * (-c + 2) / 2;
public class MyString
{
5. public static void main(String[] args)
{
int b = 5;
int c = 10;
int a = b * (-c + 2) / 2;
System.out.println("a: "+a);
}
}
14. If the String major = "Computer Science", what is returned by major.charAt(1)?
public class MyString
{
public static void main(String[] args)
{
String major = "Computer Science";
System.out.println(major.charAt(1));
}
}
15. For the following questions, refer to the class defined below:
import java.util.Scanner;
public class Questions15
{
public static void main(String[ ] args)
{
int x, y, z;
double average;
Scanner scan = new Scanner(System.in);
6. System.out.println("Enter an integer value");
x = scan.nextInt( );
System.out.println("Enter another integer value");
y = scan.nextInt( );
System.out.println("Enter a third integer value");
z = scan.nextInt( );
average = (x + y + z) / 3;
System.out.println("The result of my calculation is " + average);
}
}
16. What is the output of the following program?
public class Precision
{
public static void main(String[] args)
{
int x=5;
int y =5;
int z = 3;
double average;
average = (x + y + z) / 3;
System.out.println("The result of my calculation is " + average);
}
}
ANS: ÏYour gross pay is $1000.0
17. What is the output of the following program?
7. public class Initialize
{
// This program shows variable initialization.
public static void main(String[] args)
{
int month = 2, days = 28;
System.out.println("Month " + month + " has " +
days + " days.");
}
}
18. What is the output of the following program?
public class Payroll
{
public static void main(String[] args)
{
int hours = 40;
double grossPay, payRate = 25.0;
grossPay = hours * payRate;
System.out.println("Your gross pay is $" + grossPay);
}
}
19.
import java.util.Scanner; // Needed for the Scanner class
/*
This program has a problem reading input.
*/
8. public class InputProblem
{
public static void main(String[] args)
{
String name; // To hold the user's name
int age; // To hold the user's age
double income; // To hold the user's income
// Create a Scanner object to read input.
Scanner keyboard = new Scanner(System.in);
// Get the user's age.
System.out.print("What is your age? ");
age = keyboard.nextInt();
// Get the user's income
System.out.print("What is your annual income? ");
income = keyboard.nextDouble();
// Get the user's name.
System.out.print("What is your name? ");
name = keyboard.nextLine();
// Display the information back to the user.
System.out.println("Hello " + name + ". Your age is " +
age + " and your income is $" +
income);
}
}
What is your age? 50
¼¼§ÏWhat is your annual income? 1000
ÏϧÏWhat is your name? Hello . Your age is 50 and your income is $1000.0
9. To fix the problem, add this line before the statement of System.out.print("What is your
name? ");
// Consume the remaining newline.
keyboard.nextLine();
20. What is the output of the following program?
// This program demonstrates the char data type.
public class Letters
{
public static void main(String[] args)
{
char letter;
letter = 'A';
System.out.println(letter);
letter = 'B';
System.out.println(letter);
}
}
21. Write an expression that produces a random integer in the following ranges:
Range
0 to 12
1 to 20
22.
public class MyString
10. {
//-----------------------------------------------------------------
// Prints a string and various mutations of it.
//-----------------------------------------------------------------
public static void main(String[] args)
{
String str1="Two";
System.out.println( str1 );
int count=str1.length();
System.out.println(count);
System.out.println( str1.length() );
String str3 = str1.substring(1,3);
System.out.println( str3 );
String str2= new String ("Three");
String str6= new String ("THREE");
boolean equalThree1 = str2.equals(str6);
boolean equalThree2 = str2.equalsIgnoreCase(str6);
String str4= str2.concat(" Four");
String str5=str2.replace('e', 'x');
System.out.println( str2 );
System.out.println( str4 );
System.out.println( str5 );
System.out.println( equalThree1 );
System.out.println( equalThree2 );
String str7="AB";
String str8="CD";
System.out.println( str7.compareTo(str8) );
System.out.println( str8.compareTo(str7) );
System.out.println (str7.charAt(0));
}
}
23.
Trace the execution of the following program assuming the input stream contains the numbers
11. 10, 3, and 14.3. Use a table that shows the value of each variable at each step. Also show the
output (exactly as it would be printed).
// FILE: Trace.java
// PURPOSE: An exercise in tracing a program and understanding
// assignment statements and expressions.
import java.util.Scanner;
public class Trace
{
public static void main (String[] args)
{
int one, two, three; //line 1
double what; //line 2
Scanner scan = new Scanner(System.in); //line 3
System.out.print ("Enter two integers: "); //line 4
one = scan.nextInt(); //line 5
two = scan.nextInt(); //line 6
System.out.print("Enter a floating point number: "); //line 7
what = scan.nextDouble() ; //line 8
three = 4 * one + 5 * two; //line 9
two = 2 * one; //line 10
System.out.println ("one " + two + ":" + three); //line 11
one = 46 / 5 * 2 + 19 % 4; //line 12
12. three = one + two; //line 13
what = (what + 2.5) / 2 ; //line 14
System.out.println (what + " is what!"); //line 15
}
}
24. Write an application that reads values representing a time duration in hours, minutes, and
seconds and then prints the equalivant total number of seconds. (for example, 1 hour, 28 minutes
and 42 seconds is equivalent to 5322 seconds.)
Solution
Hi, Friend please do not post more than 5 questions in a single post.
Please find my answer for first 6 questions.
Please post other questions in other post.
1)
HereThere Everywhere
But notin NJ
Explanation:
System.out.println => peint the argument on TERMINAL
+ => concatenate two string OR one string and other is any data type
2)
Output:
1 big bad wolf 8 the 3 little pigs
4 dinner
2night
Line break with and character
Ans: 3
3)
println is a method of System class
Ans: ) method
13. 4)
c.data value stored in memory that can not change its type during the program’s execution
5)
X: 25
Y: 65
Z: 30050
6)
Ans: 105
System.out.println(""+x+y); -=> ""+x = 10 that is string
10(string) + 5(int) => 105 (string)