-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProductStudy.cs
40 lines (37 loc) · 974 Bytes
/
ProductStudy.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ClassObjectConsoleApp
{
internal class ProductStudy
{
private int Id;
public int getId()
{
return Id;
}
public int setId()
{
return Id;
}
public string Name { get; set; }
public int Qty { get; set; }
public double Price { get; set; }
public double Amount{
get => Qty * Price;
}
public void Input()
{
Console.Write("Enter ID = ");
Id = int.Parse(Console.ReadLine());
Console.Write("Enter Name = ");
Name = Console.ReadLine();
Console.Write("Enter qty = ");
Qty = int.Parse(Console.ReadLine());
Console.Write("Enter unit price= ");
Price = double.Parse(Console.ReadLine());
}
}
}