1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dedylja [7]
3 years ago
11

how to create use an array of Course objects instead of individual objects like course 1, course 2, etc

Computers and Technology
1 answer:
AURORKA [14]3 years ago
3 0

Answer:

To save the course object instances in an array, use;

Course[] courses = new Course[7];

courses[0] = new Course("IT 145");

courses[1] = new Course("IT 200");

courses[2] = new Course("IT 201");

courses[3] = new Course("IT 270");

courses[4] = new Course("IT 315");

courses[5] = new Course("IT 328");

courses[6] = new Course("IT 330");

Explanation:

The java statement above assigns an array of size 7 with the course class constructor, then order courses are assigned to the respective indexes of the new array.

You might be interested in
How to get a satellite image of something or someplace?
iogann1982 [59]
You go onto google maps and type the name in 
5 0
3 years ago
Can anyone find any words in here?
kogti [31]

Answer:

Pit, all, heck, ton, act

Explanation:

3 0
4 years ago
Read 2 more answers
When did color photography begin? early 1800s , mid 1800s , early 1900s , the 1940s
Flura [38]

early 1900s is your answer

3 0
4 years ago
Copy the main given below. Write the methods needed to produce the output given. YOU SHOULD NOT CHANGE MAIN
Bad White [126]

Answer:

C++ code explained below

Explanation:

CODE

#include <iostream>

using namespace std;

// prototypes go here

void getInput(double *l, double *w) {

cout << "Enter Length: ";

cin >> *l;

if(*l < 0) {

return;

}

cout << "Enter Width: ";

cin >> *w;

while(*w < 0) {

cout << "Width must be positive! Try Again" << endl;

cout << "Enter Width: ";

cin >> *w;

}

}

double calculations(double l, double w, double *perimeter) {

*perimeter = 2 * (l + w);

return l*w;

}

void printResults(double l, double w, double perimeter, double area) {

cout << "Rectangle Dimensions: " << l << " X " << w << endl;

cout << "perimeter: " << perimeter << endl;

cout << "Area: " << area << endl;

return;

}

int main()

{

double t;

// test(&t);

double length;

double width;

double perimeter;

double area;

//below line has to change if you need to work this example

//reason is length and width are local variable to main so other function can only change if address is passed so i have plase & sign before the variables while passing

//same has to be done for perimeter

getInput(&length, &width);

while (length >= 0)

{

area = calculations(length, width, &perimeter);

printResults(length, width, perimeter, area);

getInput(&length, &width);

}

}

4 0
3 years ago
If you can photoshop please text me i need help for my digital media class 7862381441
yKpoI14uk [10]

Answer:

I don't know what that is but what type of work you need help with

have a good day :)

Explanation:

5 0
3 years ago
Other questions:
  • What is the highest payed country
    9·1 answer
  • A typical, small, dry cell battery has a voltage of A. 6.0 volts. B. 1.0 volts. C. 12.0 volts. D. 1.5 volts.
    11·2 answers
  • Convert 15 from decimal to binary. Show your work.
    14·1 answer
  • What does the binary odometer show about representing large numbers?
    8·1 answer
  • Splunk knows where to break the event, where the time stamp is located and how to automatically create field value pairs using t
    7·1 answer
  • Which of the following are common data types? Check all that apply.
    6·1 answer
  • WHAT IS ONE WAY A PIVOTTABLE COULD COMBINE THE FOLLOWING DATA
    10·1 answer
  • Which is the purpose of adding B-Roll footage to a sequence?
    10·1 answer
  • A constraint that is concerned with cost and must be considered when designing is Group of answer choices Economic Aesthetic Pol
    6·1 answer
  • All Office programs have similar commands on the tab for changing the document view a. File b. View c. Locate d. display ​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!