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
podryga [215]
3 years ago
13

Consider the following method, which is intended to count the number of times the letter "A" appears in the string str.

Computers and Technology
1 answer:
sasho [114]3 years ago
7 0

The instruction that should replace /* missing code */ so that the method countA works as intended is (e)  str = str.substring(pos+1);

<h3>Methods</h3>

The program is an illustration of methods (or functions)

Methods are blocks of program statements that are executed when called or evoked

For the method to return the number of character A in a string, the loop body must check if the current character is A.

This is done using the substring method of a string

The syntax of this is: str.substring(pos + 1).

Where str represents the string, and pos + 1 represents the character index

Hence, the missing instruction is str = str.substring(pos+1);

Read more about methods at:

brainly.com/question/14284563

You might be interested in
Jason is working on a Microsoft Excel worksheet and he wants to create a Print Preview shortcut. His teacher asks him to access
EastWind [94]

Answer:

New Tab (Custom) and New Group (Custom)

Explanation:

In order to accomplish this Jason needs to use New Tab (Custom) and New Group (Custom). The New Tab (Custom) will allow Jason to add a new tab with the Print Preview shortcut as a brand new tab in the software. Then using the New Group (Custom) tab, Jason can group the Print Preview shortcut with the worksheet toolbar so that it appears as part of the original toolbar with the rest of the tools available in the toolbar.

5 0
3 years ago
Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invo
vova2212 [387]

Answer:

The procedure in SQL is created as follows

Explanation:

--creating the procedure

CREATE OR REPLACE PROCEDURE prc_inv_amounts (W_IN IN NUMBER)

AS

--defining variables

W_CK NUMBER := 0;

W_SUBT NUMBER := 0;

W_TAX NUMBER := 0;

BEGIN

--Authentication process of the invoice

SELECT COUNT(*) INTO W_CK FROM INVOICE WHERE INV_NUMBER := W_IN;

--Transaction confirmation

IF W_CK = 1 THEN

SELECT SUM(LINE_TOTAL) INTO W_SUBT FROM LINE

WHERE

--checking the invoice for the desired invoice number

LINE.INV_NUMBER = W_IN;

W_TAX :=W_SUBT * 0.08;

--updating the invoice

UPDATE INVOICE

--setting the new values

SET INV_SUBTOTAL = W_SUBT,

INV_TAX = W_TAX,

INV_TOTAL =W_SUBT + W_TAX

WHERE INV_NUMBER = W_IN;

--ending the if statement

END IF;

--ending the procedure

END;

7 0
3 years ago
Write a shell (text-based) program, called sum_second.py, that opens a text file called stuff.txt with 2 numbers per line separa
Ivanshal [37]

Answer:

See explaination for the program code

Explanation:

The Programming code:

inFile = open("stuff.txt", "r")

num = []

Sum = 0

for val in inFile.readlines():

value = val.split(",")

Sum = Sum + int(value[1])

print("Sum of second number on every line in the file is: ", Sum)

inFile.close()

Please kindly check attachment for output

6 0
3 years ago
Blender is used by which video game team member?
prohojiy [21]

Answer:

The 2nd one

Explanation:

6 0
3 years ago
100 POINTSSSSSSS!!
lianna [129]

i need help on that too :cc

5 0
3 years ago
Other questions:
  • Enterprise application integration (eai) software enables users to model the business processes and interactions that should occ
    8·1 answer
  • When creating a chart or graph, which should be completed first?
    9·2 answers
  • If I dribbled on my motherboard and I used windex to clean off the spit would it still work ?
    11·2 answers
  • The area of a square is stored in a double variable named area. write an expression whose value is length of the diagonal of the
    8·1 answer
  • A program runs from start to finish, producing unexpected results, though no error message is received. What most likely occurre
    15·1 answer
  • What is data Communications​
    11·2 answers
  • The lines that connect the points of a polygon are called: (1 point)
    6·2 answers
  • .<br>1.<br>CPU<br>f. ALU<br>. CU<br>h. CRT<br>g. LED<br>​
    15·1 answer
  • Difference between electrical and electronic devices
    15·2 answers
  • What is business agility
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!