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 19:30
What are loans to a company or government for a set amount of time
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
Carlos, an algebra teacher, is creating a series of powerpoint presentations to use during class lectures. after writing, formatting, and stylizing the first presentation, he would like to begin writing the next presentation. he plans to insert all-new content, but he wants to have the same formatting and style as in the first one. what would be the most efficient way for carlos to begin creating the new presentation? going under the file tab and opening the first presentation, deleting all content from each page, and adding new content going under the file tab and clicking on new in the left pane, then choosing new from existing going under the design tab and clicking on themes, then selecting the theme that was used for the first template going under the design tab and opening the template that was created for the first presentation
Answers: 2
question
Computers and Technology, 25.06.2019 02:30
What does a trademark indicate about a product? a trademark is a sign, symbol, or short phrase that indicates the of a product or service. type the correct answer in the box
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, 28.01.2021 22:40
question
Biology, 28.01.2021 22:40
question
Mathematics, 28.01.2021 22:40
question
Mathematics, 28.01.2021 22:40
question
Advanced Placement (AP), 28.01.2021 22:40
question
Mathematics, 28.01.2021 22:40
question
Mathematics, 28.01.2021 22:40