Answer:
A BorderLayout corresponds to a layout type where the components are organized along geographical directions represented by NORTH, SOUTH, EAST, WEST, and CENTER.
Explanation:
The layout class is awt determines the actual placement of components in the user interface. BorderLayout is a layout where the components are organized along geographical directions represented by NORTH, SOUTH, EAST, WEST, and CENTER. For example:
Panel p = new Panel();
p.setLayout(new BorderLayout());
p.add(new TextArea(), BorderLayout.CENTER);
p.add(new Button("Close"), BorderLayout.SOUTH);
This code segment will add a textarea at the CENTER of the interface and a button 'Close' towards the SOUTH.
No speak a Spanish ............
Answer:
The best example for the DBMS is certainly the Microsoft Access. And various examples of RDBMS are MySQL, Sql Server, Amazon DynamoDB and so on. However, its essential to understand the difference between the RDBMS and the DBMS. The main difference between the two is certainly that in the RDBMS the application stores the data in tabular manner, and DBMS the data is stored as files. In the RDBMS the tables comes with identifier known as primary key, and the data values are being saved in the form of tables.
Explanation:
Please check the answer section.
Answer:
Explanation:
#include<iostream>
#include<ctime>
#include<bits/stdc++.h>
using namespace std;
double calculate(double arr[], int l)
{
double avg=0.0;
int x;
for(x=0;x<l;x++)
{
avg+=arr[x];
}
avg/=l;
return avg;
}
int biggest(int arr[], int n)
{
int x,idx,big=-1;
for(x=0;x<n;x++)
{
if(arr[x]>big)
{
big=arr[x];
idx=x;
}
}
return idx;
}
int main()
{
vector<pair<int,double> >result;
cout<<"Enter 1 for iteration\nEnter 2 for exit\n";
int choice;
cin>>choice;
while(choice!=2)
{
int n,m;
cout<<"Enter N"<<endl;
cin>>n;
cout<<"Enter M"<<endl;
cin>>m;
int c=m;
double running_time[c];
while(c>0)
{
int arr[n];
int x;
for(x=0;x<n;x++)
{
arr[x] = rand();
}
clock_t start = clock();
int pos = biggest(arr,n);
clock_t t_end = clock();
c--;
running_time[c] = 1000.0*(t_end-start)/CLOCKS_PER_SEC;
}
double avg_running_time = calculate(running_time,m);
result.push_back(make_pair(n,avg_running_time));
cout<<"Enter 1 for iteration\nEnter 2 for exit\n";
cin>>choice;
}
for(int x=0;x<result.size();x++)
{
cout<<result[x].first<<" "<<result[x].second<<endl;
}
}