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
xxMikexx [17]
2 years ago
6

Given the string variable address, write an expression that returns the position of the first occurrence of the string avenue in

address.
Computers and Technology
1 answer:
Delicious77 [7]2 years ago
4 0
It depends on a language you code. I think this could be either C++ or Java. I know answer for both of them.
For C++:  <span>address.find("Avenue")
For Java: </span><span>address.indexOf("Avenue")</span>
You might be interested in
what will be the Trade discount and Invoice Amount if the List Price is $400.00 and the Trade Discount Rate is 85%
V125BC [204]

Answer:

$340

Explanation:

you have to multiply $400 bu 85% to get $340

4 0
2 years ago
What are the differences between a trap (aka software interrupt) and an interrupt (hardware interrupt)? What is the use of each
Marta_Voda [28]

Answer:

Trap is a software interrupt that occurs when there is a system call, while hardware interrupt occurs when a hardware component needs urgent attention.

Explanation:

Interrupt is an input signal that disrupt the activities of a computer system, giving immediate attention to a hardware or software request.

In trap interrupt, the system activities are stop for a routine kernel mode operation, since it has a higher priority than the user mode. At the end of the interrupt, it switches control to the user mode.

The hardware interrupt is a signal from hardware devices like the input/output devices, storage and even peripheral devices that draws an immediate attention of the processor, stopping and saving other activities and executing the event with an interrupt handler.

6 0
3 years ago
Please debug the below code in Java please.
lisabon 2012 [21]

Answer:

Check the explanation

Explanation:

//Bugs are highlighted in bold text

class Invoice

Declarations

private num invoiceNumber

private string customer

private num balanceDue

private num tax

public void setInvoiceNUMBER(num number)

Declarations

num LOW_NUM = 1000

num HIGH_NUM = 9999

if number > HIGH_NUM then

invoiceNumber = 0

else

if number < LOW_NUM then

invoiceNumber = 0

else

invoiceNumber = num

endif

return

public void setCustomer(string cust)

customer = cust

return

public void setBalanceDue(num balance)

//Bug balanceDue is Invoice class varible

//but it is assigned to balance .it gives error

balance = balanceDue

setTax()

return

private void setTax()

Declarations

//Bug TAX_RATE is declared as string

//but assigned a double value

string TAX_RATE = 0.07

tax = tax * TAX_RATE

return

public void displayInvoice()

output "Invoice #", invoiceNumber

output "Customer: ", customer

output "Due: ", balanceDue

output "Tax: ", taxDue

//Bug

//Invoice class has no variable called balance .it should be balanceDue

output "Total ", balance + taxDue

return

endClass

start

Declarations

Invoice inv1

Invoice inv2

Invoice inv3

//Warning

//it gives warning object taken but not initilaized

Invoice inv4

inv1.setInvoiceNumber(1244)

inv1.setCustomer("Brown")

inv1.setBalanceDue(1000.00)

inv1.displayInvoice()

inv2.setInvoiceNumber(77777)

inv2.setCustomer("Jenkins")

inv2.setBalanceDue(2000.00)

inv2.displayInvoice()

inv3.setInvoiceNumber(888)

inv3.setCustomer("Russell")

inv3.setBalanceDue(3000.00)

//Bug

//setTax method of Invioce doesnot take any arguments

inv3.setTax(210.00)

inv3.displayInvoice()

stop

//Here is the complete program in c++

//Run the program using Microsoft visual studio 2010 vc++

#include<iostream>

#include<iomanip>

#include<string>

using namespace std;

class Invoice

{

//class varibales

private:

           int invoiceNumber;

           string customer;

           double balanceDue;

           double tax;

//class methods

public:

           void setCustomer(string cus);

           void displayInvoice();

           void setBalanceDue(double balance);

           void setInvoiceNUMBER(int number);

           void setTax();

};

void Invoice::displayInvoice()

{

cout<< setw(10)<<"Invoice #"<<setw(5)<<invoiceNumber<<endl;

cout<<setw(10)<<"Customer: "<<setw(5)<<customer<<endl;

cout<<setw(10)<<"Due: "<<setw(5)<<balanceDue<<endl;

cout<<setw(10)<<"Tax: "<<setw(5)<<tax<<endl;

//Bug

//Invoice class has no variable called balance .it should be balanceDue

cout<< "Total "<< balanceDue + tax<<endl;

}

void Invoice::setCustomer(string cust)

{

customer = cust;

}

void Invoice::setInvoiceNUMBER(int number)

{

const int LOW_NUM = 1000;

const int HIGH_NUM = 9999;

if( number > HIGH_NUM )

invoiceNumber = 0;

else

if (number < LOW_NUM )

       invoiceNumber = 0;

else

   invoiceNumber = number;

}

void Invoice::setBalanceDue(double balance)

{

balanceDue = balance;

}

void Invoice::setTax()

{

double TAX_RATE = 0.07;

tax = balanceDue * TAX_RATE;

}

int main()

{

Invoice inv1;

Invoice inv2;

Invoice inv3;

inv1.setInvoiceNUMBER(1244);

inv1.setCustomer("Brown");

inv1.setBalanceDue(1000.00);

inv1.setTax();

inv1.displayInvoice();

inv2.setInvoiceNUMBER(77777);

inv2.setCustomer("Jenkins");

inv2.setBalanceDue(2000.00);

inv2.setTax();

inv2.displayInvoice();

inv3.setInvoiceNUMBER(888);

inv3.setCustomer("Russell");

inv3.setBalanceDue(3000.00);

inv3.setTax();

inv3.displayInvoice();

system("pause");

return 0;

}

Kindly check the output image below.

5 0
2 years ago
How are Action Buttons different than hyperlinks?
ipn [44]

Actions buttons are different than hyperlinks in many ways.

2)They are predefined shapes.

<u>Explanation:</u>

Action buttons are predefined shapes in the PowerPoint and can be used for moving between the slides of the presentation and for referring to the hyperlinks as well.

Action buttons have a predefined shape and that shape can be used to set the functionality of that particular button as a convention. Action buttons make up a strong presentation.

Action buttons can be invoked by clicking on them or just hovering over them and various sound effects can also be added on both the events to make the presentation more engaging and attractive.

8 0
2 years ago
Word processing software allows users to do which of the following: format text design pages share documents mail merge document
Sergio039 [100]
Well most word processing softwares allow you to do many things to a document, if you use google documents or microsoft word i'm pretty sure you can do all of those things
5 0
3 years ago
Read 2 more answers
Other questions:
  • A word that has a specific, predefined meaning in a programming language is called
    8·1 answer
  • Please help me with these questions
    5·1 answer
  • Which of the following statements is true?
    8·1 answer
  • Text that has equal left and right margins is said to be
    14·2 answers
  • Explain how each of the five types of prewriting assist a writer in getting started. please make it short.
    15·1 answer
  • 2. a computer system designed to run games is called what?
    11·1 answer
  • How has music changed with the use of technology?
    14·1 answer
  • Which of the following sentences from the section "The Limits To Free Enterprise With A Mixed Economy" BEST develops a central i
    10·1 answer
  • A good algorithm should have which three components?
    6·1 answer
  • A time stamp indicates the date and time that a measurement was taken. A data scientist has a list containing 10,000 time stamps
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!