using System.Collections.Generic;
private List<Smartphone> listPhone;
listPhone = new List<Smartphone>();
public List<Smartphone> ListPhone{
set { listPhone = value; }
get { return listPhone; }
public static void Main()
Smartphone ipon = new Smartphone();
Smartphone samsul = new Smartphone();
List<Smartphone> listData = new List<Smartphone>();
List<Store> listStore = new List<Store>();
Console.WriteLine("How many Store ? \n");
string jml_store = Console.ReadLine();
for(int y = 0 ; y< Convert.ToInt16(jml_store); y++){
Store objStore = new Store();
Console.WriteLine("What is Store Name ? \n");
objStore.Name = Console.ReadLine();
Console.WriteLine("How many Smartphone ? \n");
string jml = Console.ReadLine();
for(int x = 0 ; x< Convert.ToInt16(jml); x++){
Smartphone item = new Smartphone();
Console.WriteLine("Smartphone Name ?");
item.Name = Console.ReadLine();
Console.WriteLine("Smartphone ROM ?");
item.Rom = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Smartphone RAM ?");
item.Ram = Convert.ToInt16(Console.ReadLine());
objStore.ListPhone.Add(item);
foreach(Store itemStore in listStore){
Console.WriteLine("This is List Stock from " + itemStore.Name);
foreach(Smartphone item in itemStore.ListPhone){
Console.WriteLine("The Price of Smartphone " + item.Name + " with ROM " + item.Rom + " GB and RAM " + item.Ram + " GB is Rp " + item.getPrice());
return ram * 150000 + rom * 100000;