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]
3 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]3 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
Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive.
zysi [14]
Procedure SumEvenOdd(stdin: array [0..100] of integer)
var
   i, sum_even, sum_odd: integer;

begin
   for i := 0 to 100 do begin
       if stdin[i] < 0 then
           break;
       if stdin[i] mod 2 = 0 then //even number
          sum_even := sum_even +  stdin[i]
       else 
          sum_odd := sum_odd +  stdin[i]; 

       ShowMessage('sum of even is ' + IntToStr(sum_even) + ' ' + 'sum of odd                                  is' + IntToStr(sum_odd) ) ;
   end; 

end
5 0
4 years ago
__________ implements a security policy that specifies who or what may have access to each specific system resource and the type
malfutka [58]

Answer: Access control

Explanation:

Access control implements a security policy that specifies who or what may have access to each specific system resource and the type of access that is permitted in each instance.

A typical example of this is in ERPs where access controls defines what access codes a process owner has and what access a reviewer and an approval has. Where a personnel has access to carry out a transaction, review and approve the transaction, access controls are said to be deficient.

The right answer is Access control

Hope this helps!!

6 0
3 years ago
PLZ HELP!!!???
snow_tiger [21]

Arpa......................

5 0
4 years ago
Which of the following statements is true?
USPshnik [31]

Answer: (A) Computer science trends to deal with the data.

Explanation:

 The computer science basically tend to deal with the big data and data science as it is the emerging technologies with the upcoming years.

As, with the large amount of the data and high transmission rate we can easily developed new computing technologies with low budget.  

Data is basically defined as simple facts and figures and contain information that is very useful for developing the computing technology for study and processing the system.

Therefore, Option (A) is correct.

 

8 0
3 years ago
The ___ bar changes depending on which tool is currently selected…?
rodikova [14]

Answer: Options (I'm not 100% sure but I think its options.) Have a nice day!

6 0
3 years ago
Read 2 more answers
Other questions:
  • What finacial behaivor will typically lead to a low credit score
    8·1 answer
  • The numbers on the bottom of a typical check represent all of the following EXCEPT?
    12·2 answers
  • ) Consider the ambiguous CFG problem: given a context free grammar, does there exist a string that can be generated by two diffe
    5·1 answer
  • If the user enters 26 what is output? _____________
    15·1 answer
  • Create a security management policy that addresses the management and the separation of duties throughout the seven domains of a
    6·1 answer
  • How does using wind energy relate to our world today?
    8·2 answers
  • Which type of chart or graph uses vertical bars to compare data? a Column chart b Line graph c Pie chart d Scatter chart
    14·2 answers
  • Is a system software that manages the hardware resources and provides services 5o the application software
    6·1 answer
  • Helppppp meeee eeeeeee eee
    6·2 answers
  • During the installation of Windows Server 2019 Standard Edition, you encounter a disk that is marked as Disk 0 Unallocated Space
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!