Cancelado

Create, test, and submit a [url removed, login to view] file that modifies the Calculator class below to: - repost

Create, test, and submit a [url removed, login to view] file that modifies the Calculator class below to:

include two private integer fields.(int valueA, valueB)

include a public class Constructor that takes two integer parameters and sets the private fields to the values supplied.(public Calculator(int a, int b))

include a comment answering why we will not recreate the implicit constructor/default constructor? (Hint: what happens when we divide 1 by 0)

modify the existing Add, Subtract, Modify, Divide functions to use the new integer fields to return the calculations.(ie. return a + b, remove the parameters from the function Add())

Create/use a new console application Class (ie. Program Class), with a Main() function, using System, to test and display to the console, your calculator class functions with an instantiated Calculator object.(Calculator c = new Calculator(3,4))

class Calculator

{

public int Add(int value1, int value2)

{

return value1 + value2;

}

public int Subtract(int value1, int value2)

{

return value1 - value2;

}

public int Multiply(int value1, int value2)

{

return value1 * value2;

}

public int Divide(int value1, int value2)

{

return value1 / value2;

}

}

Habilidades: Programação C#, Programação C++ , SQL

Ver mais: cs programming, sharp test, sharp object, calculator programming, a b, return file, implicit, comment program, calculator console, hint system, display test, object program, sharp console program, comment submit, programming calculator, calculations program, calculator function, create console application, submit program, create program console, function calculator, create test, create console, console program, modify existing file

Acerca do Empregador:
( 0 comentários ) Nelspruit, South Africa

ID do Projeto: #5129363

2 freelancers estão ofertando em média R661 para este trabalho

it2051229

Hi, I am placing my bid on your project because I have read the requirements and I am confident enough with my C# skills. I am focused mostly on doing computer science homework here in freelancer.com and I would like t Mais

R210 ZAR in 0 dias
(114 Comentários)
5.6
vickkey7

HI, I am ready to start this project... Consider me ===================================================================== thanks

R1111 ZAR in 6 dias
(2 Comentários)
0.4