answer.
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
earnstyle [38]
1 year ago
10

What will be displayed after code corresponding to the following pseudocode is run? Main Set OldPrice = 100 Set SalePrice = 70 C

all BigSale(OldPrice, SalePrice) Write "A jacket that originally costs $ " + OldPrice Write "is on sale today for $ " + SalePrice End Program Subprogram BigSale(Cost, Sale As Ref) Set Sale = Cost * .80 Set Cost = Cost + 20 End Subprogram

Computers and Technology
1 answer:
Tatiana [17]1 year ago
7 0

Answer:

A jacket that originally costs $ 100 is on sale today for $ 80                                    

Explanation:

Main : From here the execution of the program begins

Set OldPrice = 100  -> This line assigns 100 to the OldPrice variable

Set SalePrice = 70   -> This line assigns 70to the SalePrice variable

Call BigSale(OldPrice, SalePrice)  -> This line calls BigSale method by passing OldPrice and SalePrice to that method

Write "A jacket that originally costs $ ", OldPrice  -> This line prints/displays the line: "A jacket that originally costs $ " with the resultant value in OldPrice variable that is 100

Write "is on sale today for $ ", SalePrice  -> This line prints/displays the line: "is on sale today for $ " with the resultant value in SalePrice variable that is 80

End Program -> the main program ends

Subprogram BigSale(Cost, Sale As Ref)  -> this is a definition of BigSale method which has two parameters i.e. Cost and Sale. Note that the Sale is declared as reference type

Set Sale = Cost * .80  -> This line multiplies the value of Cost with 0.80 and assigns the result to Sale variable

Set Cost = Cost + 20  -> This line adds 20 to the value of Cost  and assigns the result to Cost variable

End Subprogram  -> the method ends

This is the example of call by reference. So when the method BigSale is called in Main by reference by passing argument SalePrice to it, then this call copies the reference of SalePrice argument into formal parameter Sale. Inside BigSale method the reference &Sale is used to access actual argument i.e. SalePrice which is used in BigSale(OldPrice, SalePrice) call. So any changes made to value of Sale will affect the value of SalePrice

So when the method BigSale is called two arguments are passed to it OldPrice argument and SalePrice is passed by reference.

The value of OldPrice is 100 and SalePrice is 70

Now when method BigSale is called, the reference &Sale is used to access actual argument SalePrice = 70

In the body of this method there are two statements:

Sale = Cost * .80;

Cost = Cost + 20;

So when these statement execute:

Sale = 100 * 0.80 = 80

Cost = 100 + 20 = 120

Any changes made to value of Sale will affect the value of SalePrice as it is passed by reference. So when the Write "A jacket that originally costs $ " + OldPrice Write "is on sale today for $ " + SalePrice statement executes, the value of OldPrice remains 100 same as it does not affect this passed argument, but SalePrice was passed by reference so the changes made to &Sale by statement in method BigSale i.e.  Sale = Cost * .80; has changed the value of SalePrice from 70 to 80 because Sale = 100 * 0.80 = 80. So the output produced is:

A jacket that originally costs $ 100 is on sale today for $ 80                              

You might be interested in
Rene has secured her wireless network. However, she is worried about securing her router against newfound vulnerabilities. Which
Fynjy0 [20]
It is C I have a lot of experience with computers and technology
4 0
1 year ago
________ is the process of converting a poorly-structured table into two or more well-structured tables. optimization normalizat
bulgar [2K]

Answer:

Normalization

Explanation:

Converting a poorly-structured table and optimizing its database structure in order to reduce redundancy in relations can be referred to as database normalization. If the data is not redundant means that data inconsistencies and errors like deletion and insertion will get reduced or eliminated significantly.

4 0
1 year ago
Temperature Class Write a Temperature class that will hold a temperature in Fahrenheit and provide methods to get the temperatur
posledela

Answer:

Explanation:

   public class Temperature

   {

       double ftemp;

       public int Constructor(double fahrenheit)

       {

           ftemp = fahrenheit;

          return Convert.ToInt32(ftemp);

       }

       public void setFahrenheit(double fahrenheit)

       {

           ftemp = fahrenheit;

       }

       public void getFahrenheit()

       {

           ftemp = Constructor(ftemp);

       }

       public void getCelcius()

       {

           ftemp = (ftemp - 32) * 5 / 9;

       }

       public void getKelvin()

       {

           ftemp = (ftemp - 32) * 5 / 9 + 273.15;

       }

   }

8 0
2 years ago
Which type of address is used at the transport layer to identify the receiving application?
monitta

Answer:

Port number  is used at the transport layer to identify the receiving application

Explanation:

Transport layer is responsible for overall “end-to-end” communication. It provides communication service to the application process which might be running on “different hosts”.

TCP (Transmission Control Protocol) or UDP (User Data Protocol) is the protocol used in the Transport layer. The port number is essential so that the transport layer can carry packets to the right destination pointing to the right application.

A port number usually contains 16 bit integer. Normally this number will send along with the header. Port number plays a major role in Transport layer.

5 0
1 year ago
Darius needs to include contact information in an email that he is sending to a colleague . Which option should he choose from t
melamori03 [73]

The question is incomplete:

Darius needs to include contact information in an email that he is sending to a colleague . Which option should he choose from the ribbon?

-Attach File

-Attach Item

-Attach Policy

-Attach Signature

Answer:

-Attach Signature

Explanation:

-Attach file is an option that allows you to include any type of file that you need to send in the email.

-Attach Item  is an option that allows you to include an element from your email like a message in your inbox to the current one you are writing.

-Attach Policy is not an option.

-Attach Signature is an option that allows you to include a previously created signature with the contact information at the end of the message.

According to this, the answer is that the option that Darius should choose from the ribbon is attach signature because he needs to include contact information.

4 0
1 year ago
Other questions:
  • ____ refers to typing your entire e-mail message or discussion group post using only capital letters.
    15·1 answer
  • Modern operating system decouple a process address space from the machine's physical memory. list two advantages of this design.
    6·1 answer
  • Which feature of Badoo helped members make their profile more prominent?
    14·1 answer
  • Mathematical computations by a computer are faster than your quickest mathematical computations because the top speed of a neura
    13·1 answer
  • Write a program that allows you to create a file of customers for a company. The first part of the program should create an empt
    12·1 answer
  • A slide in Blake's presentation contained the following information:
    11·1 answer
  • Assign decoded_tweet with user_tweet, replacing any occurrence of 'TTYL' with 'talk to you later'. Sample output with input: 'Go
    14·2 answers
  • You are working on a documentation file userNotes.txt with some members of your software development team. Just before the file
    12·1 answer
  • 1. Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in
    7·1 answer
  • A small e-commerce company uses a series of Robotic Process Automation solutions to manage the backup of data from individual wo
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!