Answer:
#include<iostream>
using namespace std;
//create the function
int minElement(int arr[],int n){
int minimum = arr[0]; //store the first value of array
//for loop for iterate the each element
for(int i=0;i<n;i++){
if(arr[i]<minimum){ //compare
minimum=arr[i];
}
}
return minimum;
}
int main(){
int arr[]={4,1,7,9,2,6};
int array_size = 6;
int result = minElement(arr,array_size); //calling
cout<<"The min value is: "<<result<<endl;
}
Explanation:
First include the library iostream in the c++ programming for input/output.
then, create the function minElement() for find the minimum value in the array.
it required the one loop for iterate the each element in the array and then compare with first element in the array which is store in the variable minimum.
if array element is less than the minimum then, update the value in the minimum variable.
after complete the loop, return the result.
for capture the result create the main function and call the function with parameter array.
and finally display the result.
Answer:
Answer explained below
Explanation:
a. A country has a capital city.------------ aggregation(city is part of country)
b. A dining philosopher uses a fork. ----------- association(philosopher and fork are different entities)
c. A file is an ordinary file or a directory file. ------- generalization( both ordinary and directory files are having attributes of files)
d. Files contain records.--------- aggregation( records are part of File)
e. A polygon is composed of an ordered set of points. ----------- aggregation( points are parts of polygon)
f. A drawing object is text, a geometrical object, or a group. --------- generalization( text and geometrical objects are drawing object)
g. A person uses a computer language on a project. -------- aggregation( person and computer language are part of project)
h. Modems and keyboards are input/output devices. -------- aggregation( Modems and keyboards both are I/O devices)
i. Classes may have several attributes.------- aggregation( attributes are part of classes)
j. A person plays for a team in a certain year. ----------- aggregation(player is part of team)
k. A route connects two cities. --------- aggregation( route consists of two cities)
l. A student takes a course from a professor. ----------- association( student and course are separate entities)
Answer:
Speakers.
Explanation: Cause they only output sound, and are devices, further more they are not used to output images, like how could speakers output images using sound? They can't.
Answer:
You can say they're somewhat alike, since a worm wiggles into a tight spot, just like how a computer virus wiggles into your computer-
Hope this helps-