Answer:
The code for this class is shown in the explanation section
Explanation:
public class Circle {
private double radius;
private double diameter;
private double area;
public Circle(double radius, double diameter, double area) {
this.radius = 1;
this.diameter = diameter;
this.area = area;
}
public void setRadius(double radius) {
this.radius = radius;
diameter = radius*2;
area= Math.PI*(radius*radius);
}
public double getRadius() {
return radius;
}
}
Answer:
There is only one modification in the above loop i.e. while loop should be like this--
while (i != n)
{
sum+=arr[i]; // Line 1, In question segment it is line 2.
i++; // Line 2, In question segment it is line 1.
}
Output:
Now if the array input is 1,2,3,4,5 then the output is 15.
Explanation:
In the above question, all the line of the segment is right except the body of the loop because--
- The First line of the loop is increment statement which increments the value of "i" variable from 1 and the value of "i" variable will be 1 in the first iteration of the loop
- The second line starts to add the value from 1'st index position of the array. Hence the segment gives the wrong answer. It adds the arr[1] to arr[n-1].
- So I interchanged both lines of the while loop as shown in the answer part. I make the line 1 (In question segment) as line 2(In answer part) and line 2 (In question segment) as line 1 (In answer part).
Now It gives the correct output because it can add arr[0] to arr[n-1].
A is your answer.............
Answer:
improving the current process before automating it
A DBMS acts as a conduit between the database and the applications that will use it, enabling users to access, modify, and control how the data is arranged and optimized.
Data points that are connected to one another are stored and accessible in a relational database, which is a form of database. The relational model, an easy-to-understand method of representing data in tables, is the foundation of relational databases. Data items are requested from the database by application programs, which are created using a combination of the DBMS's data manipulation language and a traditional programming language. The DBMS locates and provides the data elements requested by the application programs.
Learn more about database here-
brainly.com/question/6447559
#SPJ4