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
Which best explains why magnets can push on or pull other magnets without touching them?
xeze [42]

A is wrong.

B is correct.

C is true but magnetic monopoles have been predicted in theory, but never found in practice.

7 0
3 years ago
In how many ways can the letters of the word APPROXIMATION be arranged?
ZanzabumX [31]

Answer:

2494800

Explanation:

A lot of math and time.

5 0
3 years ago
Create a Card class that represents a playing card. It should have an int instance variable named rank and a char variable named
Helen [10]

Answer:

Explanation:

The following code is written in Java. It creates the Card class and then uses it to create a full house and print out the rank and suit of every card in that hand.

class Card {

   int rank;

   char suit;

   public Card(int rank, char suit) {

       this.rank = rank;

       this.suit = suit;

   }

   public int getRank() {

       return rank;

   }

   public char getSuit() {

       return suit;

   }

}

class CardTester {

   public static void main(String[] args) {

       Card card1 = new Card(3, '♥');

       Card card2 = new Card(3, '♠');

       Card card3 = new Card(3, '♦');

       Card card4 = new Card(2, '♦');

       Card card5 = new Card(2, '♣');

       System.out.println("Card 1: " + card1.getRank() + " of " + card1.getSuit());

       System.out.println("Card 2: " + card2.getRank() + " of " + card2.getSuit());

       System.out.println("Card 3: " + card3.getRank() + " of " + card3.getSuit());

       System.out.println("Card 4: " + card4.getRank() + " of " + card4.getSuit());

       System.out.println("Card 5: " + card5.getRank() + " of " + card5.getSuit());

   }

}

3 0
3 years ago
Who made the first electronic device?
emmasim [6.3K]
Joseph Henry in about 1835. He is American and he made something called a relay.
6 0
3 years ago
Why do people on Brainly verify answers that are wrong. I got 90% and 80% percent on my tests because of it
Bezzdna [24]
I feel that, you can’t trust it.
3 0
3 years ago
Read 2 more answers
Other questions:
  • Andy intends to register his own domain name on the Internet for a minimal cost per year. Before he selects and registers a doma
    7·1 answer
  • __________ is when a person feels compelled to acquire and abuse a drug despite the harm it causes him or her personally, and de
    7·2 answers
  • In terms of data storage and sharing, in what way, if any, do dropbox services differ from archiving services?
    8·1 answer
  • The company where Derek works has tasked him with setting up and securing a SOHO router. He wants to make sure the wireless netw
    7·1 answer
  • The memory unit of a computer has 2M Words of 32 bits (or 4 bytes) each. The computer has an instruction format with 4 fields: a
    14·1 answer
  • Will give brainly if answer all or my questions
    8·1 answer
  • Assert statements are a tool programmers employ to help them debug their code more efficiently.
    6·1 answer
  • Design an Application called Student Course Management create interface called Student Course add an abstract method called ad C
    10·1 answer
  • Describe accessibility in Windows 7 ​
    13·1 answer
  • How to transfer polygon from eth to polygon in ledger live
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!