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
oee [108]
2 years ago
7

The IntList class contains code for an integer list class. Study it; notice that the only things you can do are: create a list o

f a fixed size and add an element to a list. If the list is already full, a message will be printed. List Test is a driver class that creates an IntList, puts some values in it, and prints it. Compile and run it to see how it works.
Computers and Technology
1 answer:
torisob [31]2 years ago
8 0

Explanation:

public class Int_List

{

protected int[] list;

protected int numEle = 0;

 

public Int_List( int size )

{

list = new int[size];

public void add( int value )

{

if ( numEle == list.length )

{

System.out.println( "List is full" );

}

else

{

list[numEle] = value;

numEle++;

}

}

public String toString()

{

String returnStr = "";

for ( int x = 0; x < numEle; x++ )

{

returnStr += x + ": " + list[x] + "\n";

}

return returnStr;

}

}

public class Run_List_Test

{

public static void main( String[] args )

{

 

Int_List myList = new Int_List( 7 );

myList.add( 102 );

myList.add( 51 );

myList.add( 202 );

myList.add( 27 );

System.out.println( myList );

}

}

Note: Use appropriate keyword when you override "tostring" method

You might be interested in
Tanner is creating a brochure for his Web-hosting company. He designed the layout and placed a picture in the center of the page
Romashka [77]
Resizing is a very simple process. On the photo editing program, simply click on the image, and if resize handles appear around it, click and drag those to the desired size. If the program has a dedicated resizing or rescaling tool, use it and follow the above instructions. Keep the photo proportionate by holding down the shift key while dragging a corner handle. <span>Tanner has to make sure that his photo his of a high enough resolution to resize. A pixellated or blurry photo will only get worse when scaled up. He also has to make sure he doesn't resize it to be too big or it will also end up pixellated.</span>
5 0
3 years ago
What aviation first is janice brown credited with
Alla [95]

Janice Brown is a former teacher who flew the first long-distance solar-powered flight. She flew a small experimental solar-powered aircraft six miles.

Let me know if you have any questions.

7 0
2 years ago
Create the HTML code for this
Marta_Voda [28]

Answer:

index.html:

<!DOCTYPE html>

<html>

 <head>

   <title>Brainly</title>

   <link href="style.css" rel="stylesheet" type="text/css" />

 </head>

 <body>    

   <table id="myTable">

     <caption>Duty Roster for last two days</caption>

     <tr><th>Day</th><th>Morning</th><th>Afternoon</th></tr>

     <tr><td>Monday</td><td colspan="2">John</td></tr>

     <tr><td>Tuesday</td><td rowspan="2">Tom</td><td>Peter</td></tr>

     <tr><td>Wednesday</td><td>simon</td></tr>

   </table>

 </body>

</html>

<u>style.css:</u>

#myTable {

 background-color: Cyan;

 border-collapse: collapse;  

 height: 200px;

 width: 500px;

 font-size: 20px;

}

#myTable td,th {

 border: 2px black solid;

 text-align: center;

}

#myTable td:first-child, th {

 background-color: lightgray;

 font-weight: bold;

}

3 0
2 years ago
If you want an app to reach the largest possible audience, which two platforms should you use?
Papessa [141]

Android Studio for Android, and Xcode for Apple devices.

6 0
2 years ago
Which type of memory is used as the working storage space of the computer?
natta225 [31]
Internal memory is used as the working storage space of the computer
4 0
3 years ago
Other questions:
  • What can you do to make sure you have a healthy credit report
    13·2 answers
  • Double clicking a word selects the entire word?
    10·1 answer
  • You are configuring a switch that has three hosts attached to FastEthernet 0/2 through 0/4. All three hosts are part of a public
    10·1 answer
  • A newly opened law firm in Kirkland decides to create a small website that provides a brief introduction of the firm, its missio
    8·1 answer
  • Jane is creating a slide that will have a large heading and number of bullet points below it. What slide format should she use?
    12·1 answer
  • A Cisco Catalyst switch has been added to support the use of multiple VLANs as part of an enterprise network. The network techni
    5·1 answer
  • When browsing using certain browsers, if a page is known to be malicious or using phishing techniques in the past a browser may
    5·1 answer
  • Question # 7
    11·1 answer
  • A ____ is an Access feature that makes it easy to enter data.
    7·2 answers
  • (Synchronized threads) Write a program that launches 1000 threads. Each thread adds a random integer (ranging from 1 to 3, inclu
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!