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
Fantom [35]
3 years ago
8

Suppose that the bag class is efficiently implemented with a fixed array with a capacity of 4000, as in Chapter 3 of the class t

ext. We execute these statements: bag b; b.insert(5); b.insert(4); b.insert(6); b.erase_one(5);
Computers and Technology
1 answer:
Phoenix [80]3 years ago
6 0

Answer:

b.used is 2, b.data[0] is 4, b.data[1] is 6

Explanation:

bag b;

b.insert(5); // b has 5

b.insert(4); // b has 5,4

b.insert(6); // b has 5,4,6

b.erase_one(5); // now 5 is removed , b has 4,6

so no:of elements b.used is 2

b[0]=4;

b[1]=6;

You might be interested in
Write a java program to print the following series: <br>1 5 9 13 17...n terms​
andrew11 [14]

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

int n;

System.out.print("Max of series: ");

n = input.nextInt();

for(int i = 1; i<=n;i+=4){

    System.out.print(i+" ");

}

}

}

Explanation:

This declares n as integer. n represents the maximum of the series

int n;

This prompts the user for maximum of the series

System.out.print("Max of series: ");

This gets user input for n

n = input.nextInt();

The following iteration prints from 1 to n, with an increment of 4

<em> for(int i = 1; i<=n;i+=4){</em>

<em>     System.out.print(i+" ");</em>

<em>}</em>

6 0
3 years ago
Read 2 more answers
Heather writes an essay for language arts and receives a poor grade. To figure out why she gets a poor grade, Heather looks at t
Kazeer [188]

Answer:

Glows and grows strat

Explanation:

4 0
3 years ago
Read 2 more answers
What are the uses of ICT in health department write at least 6 uses in brief​
Alinara [238K]

Answer: See Explanation

Explanation:

The uses of ICT in health department include:

1. ICT helps in the improvement of the safety and the satisfaction of patients as new technologies are being developed to endure that patients are treated faster and their chance of survival increase.

2. ICT helps in looking for prevention measures which will be used to eradicate diseases.

3. ICT helps in the storage of medical data electronically. This will help in the easy retrieval of information.

4. ICT helps in the spread of information and also ensures distant consultation which are essential to achieving health related goals. e.g telemedicine.

5. ICT helps in the easy and fast spread of information and also facilitates cooperation and enhances teamwork among the health workers.

6. ICT brings about efficiency and effectiveness of administrative systems.

4 0
3 years ago
A page layout technique that often uses a percentage value for width is called ________.
masya89 [10]
It is called a fluid layout

A fluid web page typically is configured with percentage widths that sometimes take up 100% of the browser. They will use relative units like percentages instead of pixels and will often fill the width of the page regardless of what the width of the browser might be. They keep the same spatial weighting to all elements and works fine on different sizes of screens of similar sort. They define each area of an image layout perfectly.  




4 0
4 years ago
Pennies for Pay Design and write a python program to pass Lab 4-7 with the following modifications: 1.use an outer loop to keep
frez [133]

Answer:

Here you go, change it however you'd like :)

Explanation:

(A nested loop was not needed to fulfill this task)

usr = int(input("How many days would you like to calculate: "))

pen = 0.01

for n in range(1, usr + 1):

   print(f"Day: {n} | Amount: ${pen}")

   pen += pen

6 0
3 years ago
Other questions:
  • Ted is asked to create a page containing his family photos for a family reunion website. He will has about 20 pictures to post,
    14·1 answer
  • Which one of the following features can control left and right indents using markers?
    5·2 answers
  • If your computer will not turn on, What is something you can would you use to diagnose the problem?
    7·2 answers
  • Helppp meeeeeeeeeeeeeee
    11·1 answer
  • Write a method named showChar. The method should accept two arguments: a reference to a String object and an integer. The intege
    6·1 answer
  • Speed is how fast an object moves a certain distance within a length of time. How is speed calculated?
    14·2 answers
  • Help me, please! No links btw :)
    9·2 answers
  • A carver begins work on the following block of granite that weighs 2700 g. What is the density of the granite?
    13·1 answer
  • Lourdes is going to create a company logo. She will create it in a vector format so that she can resize it without distortion. W
    15·1 answer
  • Q1) What would be the output of the program shown in the figure?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!