Answer:
C++
Explanation:
class MyBoxes {
private:
// Pointer to Box object and array size. Required for dynamically creating an array.
Box* boxes;
int array_size;
// Constructor
MyBoxes(int array_size) {
self.array_size = array_size;
boxes = new Box[array_size] ;
}
public:
// Methods
int emptyspace() {
int count = 0;
for (int i=0; i < self.array_size; i++) {
// Check for null
if (!boxes[i])
count++;
}
return count;
}
void add(int length, int width, int height) {
Box box1(length, width, height);
if (self.emptyspace() == 0) {
self.addToArray(box1);
}
}
void print() {
Box *temporaryBox;
for (int i=0; i < self.array_size; i++) {
temporaryBox = boxes[i];
if (temporaryBox) {
cout<<temporaryBox->length<<endl;
cout<<temporaryBox->width<<endl;
cout<<temporaryBox->height<<endl;
}
}
// Free memory
delete temporaryBox;
}
Answer:
Literate
Explanation:
A computer literate is a person that is high in knowledge and skill with computers, knowing the device inside and out
Answer:
import math
math.sqrt( x )
Explanation:
The basic code that can be written to calculate the square root of a number is as follows
import math
math.sqrt( x )
Answer:
The correct answer is A) "red"
Explanation:
Using arrays and lists are very helpful when writing programs. They help simplify programs by storing <u>related data</u> under one name.
In the question above the general name is <u>myList</u>. <em>The related data are red, orange, yellow, green, blue, indigo, and violet.</em>
This means that myList contains values a,b,c,d,e,f, and g. However myList[1] only contains value "red".
Cheers!