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
. A collection of programs designed to create and manage databases is called a(n))
Daniel [21]

Answer:

Database Management System.

Explanation:

Database Management System is the collection of programs and data used to create ,define and manipulate the database.

There are several database management systems present and some of them are as following:-

  1. RDBMS (Relational Database Management System)
  2. No SQL DBMS
  3. CDBMS(Columnar Database Management System).
  4. IMDBMS(In-Memory Database Management System).
6 0
2 years ago
A top level class may have only the following accessmodifier.
GREYUIT [131]

Answer: Public

Explanation:

 A top level class can have a public, as top level cannot be private and protected because the modifier private is not allowed. As, top level is a class which is not a nested class. Interface of a access modifier is either public or no modifier. There are two types of access control modifier are top level - public and member level- private, protected.

3 0
3 years ago
Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 5
omeli [17]

Answer:

The Following are the code to this question:

def cost(miles, milesPerGallon, dollarsPerGallon):##defining a method cost that accepts three parameter

   return miles / milesPerGallon * dollarsPerGallon# calculate cost and return it value  

milesPerGallon = float(input('Enter miles/Gallon value: '))#defining variable milesPerGallon for user input  

dollarsPerGallon = float(input('Enter dollars/ Gallon value: '))#defining variable dollarsPerGallon for user input

print('{:.5f}'.format(cost(10, milesPerGallon, dollarsPerGallon)))#call method and print its value

print('{:.5f}'.format(cost(50, milesPerGallon, dollarsPerGallon)))#call method and print its value

print('{:.3f}'.format(cost(400, milesPerGallon, dollarsPerGallon)))#call method and print its value

Output:

Enter miles/Gallon value: 20.0

Enter dollars/ Gallon value: 3.1599

1.57995

7.89975

63.198

Explanation:

In the above-given code, a method "cost" is defined, that accepts three value "miles, milesPerGallon, and dollarsPerGallon" in its parameter, and use the return keyword for calculating and return its value.

In the next step, two variable "milesPerGallon, and dollarsPerGallon" is declared, that use the input method with float keyword for input floating-point value.

After input value, it uses a print method with different miles values, which are "10,50, and 400", and input value to pass in cost method to call and print its return value.

5 0
3 years ago
What cold, hard facts support your position?
Sladkaya [172]
Idk what is it?
a computer?
plz mark me as brainliest
6 0
3 years ago
CORRECT ANSWER GETS BRAINLIEST PLEASE HELP !
KIM [24]

Answer:

Mediator

Explanation:

A mediator is a person that tries to reserve peace within groups, and they often try to prevent conflict.

4 0
2 years ago
Other questions:
  • How do switches and bridges learn where devices are located on a network?
    5·1 answer
  • Write an expression that evaluates to true if and only if the value of the integer variable workedOvertime is true.
    7·1 answer
  • Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In 1–2 sentences, descri
    9·2 answers
  • Carlos is using the software development life cycle to create a new app. He has finished coding and is ready to see the output i
    12·2 answers
  • Anyone know how to delete that I need ASAP
    13·1 answer
  • he degree of operating leverage is equal to: Group of answer choices FC / OCF. VC / OCF. 1 FC / OCF. 1 VC / OCF. 1 Picture FC /
    9·1 answer
  • 5.7 AP-Style MC Practice edhessive
    14·1 answer
  • Discuss the core technologies and provide examples of where they exist in society. Discuss how the core technologies are part of
    14·1 answer
  • Which of the following is not an advanced strategy you may use to help you conduct a search on the Internet?
    15·2 answers
  • In what ways are super computer different from mainframe computers.​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!