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
Vesna [10]
2 years ago
8

sure the provided file named Furniture.cpp is open. The file includes variable declarations and output statements. Read them car

efully before you proceed to the next step. Design the logic and write the C++ code that will use assignment statements to: Calculate the profit (profit) as the retail price minus the wholesale price Calculate the sale price (salePrice) as 25 percent
Computers and Technology
1 answer:
larisa [96]2 years ago
7 0

This question is incomplete. The complete question is given below:

In this lab, you complete a partially written C++ program that is provided for you. The program, which was written for a furniture company, prints the name of the furniture item, its retail price, its wholesale price, the profit made on the piece of furniture, a sale price, and the profit made when the sale price is used.

Instructions

Ensure the provided file named Furniture.cpp is open.

The file includes variable declarations and output statements. Read them carefully before you proceed to the next step.

Design the logic and write the C++ code that will use assignment statements to:

Calculate the profit (profit) as the retail price minus the wholesale price

Calculate the sale price (salePrice) as 25 percent deducted from the retail price

Calculate the sale profit (saleProfit) as the sale price minus the wholesale price.

Execute the program by clicking the Run button. Your output should be as follows:

Item Name: TV Stand

Retail Price: $325

Wholesale Price: $200

Profit: $125  

Sale Price: $243.75

Sale Profit: $43.75

Code

// This program calculates profits and sales prices for a furniture company.

#include <iostream>

#include <string>

using namespace std;

int main()

{

string itemName = "TV Stand";

double retailPrice = 325.00;

double wholesalePrice = 200.00;

double salePrice;

double profit;

double saleProfit;

     

// Write your assignment statements here

     

cout << "Item Name: " << itemName << endl;

cout << "Retail Price: $" << retailPrice << endl;

cout << "Wholesale Price: $" << wholesalePrice << endl;

cout << "Profit: $" << profit << endl;  

cout << "Sale Price: $" << salePrice << endl;

cout << "Sale Profit: $" << saleProfit << endl;

return 0;

Answer:

#include <iostream>

#include <string>

#include <iomanip>

using namespace std;

int main()

{

  string itemName = "TV Stand";

  double retailPrice = 325.00;

  double wholesalePrice = 200.00;

  double salePrice;

  double profit;

  double saleProfit;

  profit=retailPrice-wholesalePrice;

  salePrice=retailPrice-retailPrice*.25;

  saleProfit=salePrice-wholesalePrice;

  cout<<fixed<<setprecision(2);

  cout << "Item Name: " << itemName << endl;

  cout << "Retail Price: $" << retailPrice << endl;

  cout << "Wholesale Price: $" << wholesalePrice << endl;

  cout << "Profit: $" << profit << endl;

  cout << "Sale Price: $" << salePrice << endl;

  cout << "Sale Profit: $" << saleProfit << endl;

  return 0;

}

Explanation:

  • Calculate profit on retailPrice by subtracting wholesalePrice from the retailPrice.
  • set salePrice as 25% by multiplying it with 0.25.
  • Calculate the profit on sale price by subtracting wholesalePrice from the salePrice.  
  • Finally print the values of item name, retail price, wholesale price, profit, sale price and sale profit respectively.

You might be interested in
Scenario 1: Richman Investments provides high-end smartphones to several employees. The value of each smartphone is $500, and ap
vfiekz [6]

Answer:

a). SLE =$37.5

b). ARO =75

c). ALE = $2,812.5

Explanation:

a).Single loss Expectancy (SLE) is starting point in determining the single loss of an asset that will occur and calculated this;

SLE = asset value * exposure factor.

Asset value =$500,

Exposure factor is simply the percentage of asset lost.

In this case out of 1000 phones, 75 were damaged or loss.

In percentage;

75 ÷ 1000 =0.075, 0.075×100=7.5%(exposure factor).

Therefore,

SLE = $500×7.5%= $37.5.

b). ARO - Annual Rate of Occurrence is the number of times a threat on a single asset is expected to occur in one year.

In the case the damage or loss occured in 75 devices in one year.

c). ALE - Annualized loss Expectancy is the product of SLE and ARO.

Therefore;

ALE = $37.5 × 75 = $2,812.5.

3 0
2 years ago
Identify the correct language concept or term from the drop-down menu. A Programming Language is a language that physically runs
babymother [125]

Answer and Explanation:

In computer processing of text, a markup language is a way to annotating a document that is different from the book.In the computer, the markup language is a system annotating a text. Such a system uses procedural and descriptive markup. These are called lightweight markup language.

A programming language that physically runs on the website is called display markup.A programming language that is frequently used to develop websites with database is known as JAVA , PHP , HTML ,tags.These are the language that are used with existing markup language.

8 0
2 years ago
Read 2 more answers
Which of the following is true with regard to defensive programming? Preconditions should never be visible to callers. Program c
Firlakuza [10]

Answer:

The correct point about defensive programming is that the "program code frequently assumes that input will be valid and that algorithms will behave as expected".

Explanation:

8 0
2 years ago
Before you take any medicine, _____ to see if it could affect your ability to drive.
siniylev [52]

Answer: <em>B. read the warning labels</em>

6 0
2 years ago
Read 2 more answers
You are asked to check your company’s configurations to determine if any filters should be built to stop certain ICMPv6 traffic.
DedPeter [7]

ICMPv6 is used by IPv6 nodes to report errors encountered in processing packets, and to perform other internet-layer functions, such as diagnostics.  An Internet Control Message Protocol (ICMP) flood attack, also known as a Ping flood attack, is a common Denial-of-Service (DoS) attack in which an attacker attempts to overwhelm a targeted device with ICMP echo-requests.

Explanation:

Issues that are of concern which could be a problem include :

Denial-of-Service Attacks  

  • ICMPv6 can be used to cause a denial of service (DoS) in a number of  ways, including simply sending excessive numbers of ICMPv6 packets to destinations in the site and sending error messages that disrupt  established communications by causing sessions to be dropped.

Probing

  • A major security consideration is preventing attackers from probing  the site to determine the topology and identify hosts that might be vulnerable to attack.  Carefully crafted but, often, malformed  messages can be used to provoke ICMPv6 responses from hosts thereby  informing attackers of potential targets for future attacks.  However, the very large address space of IPv6 makes probing a less effective weapon as compared with IPv4 . Redirection Attacks

Redirection Attacks

  • A redirection attack could be used by a malicious sender to perform  man-in-the-middle attacks or divert packets either to a malicious  monitor or to cause DoS by blackholing the packets.  These attacks would normally have to be carried out locally on a link using the Redirect message.  Administrators need to decide if the improvement  in efficiency from using Redirect messages is worth the risk of  malicious use.  Factors to consider include the physical security of   the link and the complexity of addressing on the link

Renumbering Attacks

  • Spurious Renumbering messages can lead to the disruption of a site.  Although Renumbering messages are required to be authenticated with  IPsec, so that it is difficult to carry out such attacks in practice,  they should not be allowed through a site boundary firewall.  On the  other hand, a site may employ multiple "layers" of firewalls.

Problems Resulting from ICMPv6 Transparency

  • Because some ICMPv6 error packets need to be passed through a  firewall in both directions, malicious users can potentially use  these messages to communicate between inside and outside, bypassing  administrative inspection.

Packet types or specific circumstances in which ICMPv6 traffic could compromise network security :

Ping sweep — A type of attack that uses ICMP echo request messages to enumerate live hosts on a network.

Ping flood — Utilized to launch a denial of service attack (DoS), where the attacker sends ICMP requests in a rapid succession without waiting for the targeted system to respond.

ICMP tunneling — A method used to establish a covert communication channel between remote systems, most times between a client and a proxy. All communications are sent via ICMP requests and replies

Forged ICMP redirects —  The attacker would send a ICMP redirect message, which informs a host of a direct path to a destination, to the victim that contains the IP addresses of the attacker’s system. This allows an attacker to compromise network traffic via a man-in-the-middle attack or cause a DoS.

8 0
2 years ago
Other questions:
  • Jim has excellent oral and written communication skills. He enjoys public speaking and wants a job in which he will interact wit
    14·2 answers
  • Using Word, Maureen is writing an outline of a presentation she plans to give to her company. She will be showing a video during
    12·2 answers
  • Mr. Cooper would like to customize his Excel software so his students can create an electronic graph in Excel for their lab repo
    6·1 answer
  • 14. If B3=10 and D5=8, what would the following function return? IF(B3&gt;D5, "Closed", D5-B3) *
    9·1 answer
  • When performing actions between your computer and one that is infected with a virus, which of the following offers NO risk of yo
    11·2 answers
  • To be a successful computer systems engineer, you must be proficient in programming languages and operating systems. Similarly,
    5·2 answers
  • Identifying Characters
    11·2 answers
  • Write a script named numberlines.py. This script creates a program listing from a source program. This script should: Prompt the
    7·1 answer
  • I think you have been doing a great job but you haven’t been signing many people up for our new service feature I want you to se
    8·1 answer
  • Mary has been locked out of her account after failing to correctly enter her password three times. As the system administrator,
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!