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, 23.06.2019 00:00
What engine component is shown in the above figure?
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
A. in packet tracer, only the server-pt device can act as a server. desktop or laptop pcs cannot act as a server. based on your studies so far, explain the client-server model.
Answers: 2
question
Computers and Technology, 23.06.2019 23:30
What can you prevent issues related to downloading content form the internet
Answers: 1
You know the right answer?
C# 1. Create a new class called StandardSale
2. Add three private fields to the class:
...
Questions
question
History, 22.04.2020 01:32
question
Mathematics, 22.04.2020 01:32
Questions on the website: 13722362