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
Scrat [10]
3 years ago
15

Convert the ProjectedRaises class to an interactive application named ProjectedRaisesInteractive. Instead of assigning values to

the salaries, accept them from the user as input.
Computers and Technology
1 answer:
Brrunno [24]3 years ago
7 0

Complete Question:

Write a C# program named *ProjectedRaises* that includes a named constant representing next year’s anticipated 4 percent raise for each employee in a company. Also declare variables to represent the current salaries for three employees. Assign values to the variables, and display, with explanatory text, next year’s salary for each employee.

Convert the *ProjectedRaises* class to an interactive application named **ProjectedRaisesInteractive**. Instead of assigning values to the salaries, accept them from the user as input.

Answer:

The code in C# is provided in the explanation section

Explanation:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using static System.Console;

namespace ProjectedRaisesInteractive

{

   class ProjectedRaisesInteractive

   {

       static void Main(string[] args)

       {

           

           const double percentIncrease = 1.04;

           double inputFirstSalary = 0;

           double inputSecondSalary = 0;

           double inputThirdSalary = 0;

           double outputFirstSalary = 0;

           double outputSecondSalary = 0;

           double outputThirdSalary = 0;

           //skip error checking

           Write("Enter Value for First Salary");

           inputFirstSalary = double.Parse(ReadLine());

           Write("Enter Value for Second Salary");

           inputSecondSalary = double.Parse(ReadLine());

           Write("Enter Value for Third Salary");

           inputThirdSalary = double.Parse(ReadLine());

           outputFirstSalary = inputFirstSalary * percentIncrease;

           outputSecondSalary = inputSecondSalary * percentIncrease;

           outputThirdSalary =  inputThirdSalary * percentIncrease;

WriteLine("Expected Salary Increase:{0}", percentIncrease;);

WriteLine("{0} will be {1} next year.", inputFirstSalary, outputFirstSalary);

WriteLine("{0} will be {1} next year.", inputSecondSalary, outputSecondSalary);

WriteLine("{0} will be {1} next year.", inputThirdSalary, outputThirdSalary);

       }

   }

}

You might be interested in
Given the string variables name1 and name2, write a fragment of code that assigns the larger of the two to the variable first (a
ArbitrLikvidat [17]
To screw with your teacher:

first = (name1 > name2 ) ? name1 : name2;

That code is correct, but your teacher is probably looking for:

if( name1 > name2 )
    first = name1;
else
    first = name2;

I love the ternary operator!

3 0
3 years ago
From the Start screen, you can
saul85 [17]
Depends on brand or model of computer. mine would be D.
8 0
3 years ago
Read 2 more answers
_____________ was largely responsible for the internet becoming a resource of information and not merely a medium to send and re
MissTica

Answer:

Tim Berners-Lee

Explanation:

In 1989, Tim Berners-Lee invented the World Wide Web, an Internet-based hypermedia initiative for global information sharing while at CERN, the European Particle Physics Laboratory. He wrote the first web client and server in 1990. His specifications of URIs, HTTP and HTML were refined as web technology spread.He is also known as TimBL, is an English engineer and computer scientist. He is a Professorial Fellow of Computer Science at the University of Oxford and a professor at the Massachusetts Institute of Technology.

5 0
4 years ago
Write a program that
Lemur [1.5K]

Answer:

import os

import shutil

# directory holding the file to be used

curr_path = "C:\\Users\\user\\Desktop\\test"

# change to the target directory absolute path

os.chdir(curr_path)

# create new folder  in current directory

os.mkdir('C:\\Users\\user\\Desktop\\newFolder')

 

for root, dirs, files in os.walk("."):

   for name in files:

       # check if it is pdf

       if name.endswith(".pdf"):

           # find path

           path = os.path.join(root, name)

           # find size

           size = os.stat(path).st_size

           # print absolute path and size

           print(os.path.abspath(path), "\t", size)

           # copy  the file to the new folder

           shutil.copy(path, 'C:\\Users\\user\\Desktop\\newFolder\\'+name)

Explanation:

The python program uses the os and shutil python module, which is used to interact with the computer system operating system to get the absolute path of all the pdf text files using the os.walk() method to create an iterator to loop over, printing the path string and the file size. The shutil.copy() is used to make a copy of each pdf file in the new folder.

7 0
3 years ago
La inteligencia o unidad lógica de un computador se denomina como??? Software, Hardware CPU o que, ayuda.....
Ainat [17]
<span>Unidad de lógica aritmética</span>
6 0
3 years ago
Other questions:
  • 3 component of a computer
    10·1 answer
  • When an error occurs during the execution of a method, the method ____________ an exception?
    11·1 answer
  • Chapter 7 presents a comparative analysis of various tools useful in policy making. Select two tools described in chapter 7 from
    12·1 answer
  • The _______ command was developed by nicholas harbour of the defense computer forensics laboratory.
    12·1 answer
  • What are cell phones used for?
    8·2 answers
  • If you want to change the speed of a layer's horizontal scrolling, what should you change?
    12·1 answer
  • "Write an SQL query that displays the Ssn and Last name of all employees who is a supervisor of a Department Manager"
    7·1 answer
  • A form of segmentation that is based on user usage rate, user status, purchase occasion, and benefits sought is _________.
    13·1 answer
  • What is this on G00gel Documents , how do I fix it?
    15·1 answer
  • 2.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!