subject
Computers and Technology, 14.05.2021 06:10 krog79

C# 1. Create a new class called StandardSale
2. Add three private fields to the class:
_salesDate, a DateTime
_amount, a double
_quantity, an integer
3. Also, add properties with get and set accessors for each field, call them SalesDate, Amount, and Quantity.
In the "set" accessors, use if/else to limit Amount and Quantity to positive values and
to limit SalesDate to dates on or after 1/1/2000.
Use "else" to set Quantity and Amount to 0 and SalesDate to 1/1/2000 if the input values are invalid.
4. Add a constructor so that all three fields can be populated when a StandardSale object is instantiated.
5. Add a method called TotalSale that returns _amount * _quantity as a double.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
Which is a false statement considering copyright law? a. when people upload something to the internet they automatically receive a copyright for the work b. the work does not have to contain a copyright notice to be considered having a copyright c. copyright is legal term describing rights given to the creators for literary and artistic works d. personal pictures are always covered by copyrights
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
question
Computers and Technology, 22.06.2019 13:30
Asoftware company hired ray, a college graduate to work in their development team. ray is assigned to work in the coding phase of a project. what happens during the coding phase of a software development project? a. the customer receives a working model of the software. b. developers convert the program design into code. c. developers gather requirements directly from the stakeholders. d. testing teams check the product for quality.
Answers: 1
question
Computers and Technology, 22.06.2019 16:20
Consider the following statements, then select one of the answers below: the signal() function shown below registers "sig_handler()" as the signal handler function for the sigkill signal, without the complexity of using when the sigkill signal is sent to a process running this code, by a user typing "kill -kill ", where the correct process id is used for to target the process, sig_handler() will be executed.
Answers: 1
You know the right answer?
C# 1. Create a new class called StandardSale
2. Add three private fields to the class:
...
Questions
Questions on the website: 13722359