Tumkur: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Reverted edits by 124.124.120.18 to last version by Vrenator (GLOO)
No edit summary
Line 1: Line 1:
import java.util.*;
{{About|the municipality in India|its namesake district|Tumkur district}}
public class RetailStore {
<!-- See [[Wikipedia:WikiProject Indian cities]] for details -->{{Infobox Indian jurisdiction|
private String storeName;
native_name = Tumakuru |
private ArrayList<Customer> clist=new ArrayList<Customer>();
type = city |
private ArrayList<Product> plist=new ArrayList<Product>();
latd = 13.34 | longd = 77.1|
private static int productid=0,customerid=0;
locator_position = right |
state_name = Karnataka |
|region=[[Bayaluseeme]] |
public String getStoreName() {
district = [[Tumkur district|Tumkur]] |
return storeName;
leader_title = |
}
leader_name = |
public void setStoreName(String storeName) {
altitude = 822|
this.storeName = storeName;
population_as_of = 2001 |
}
population_total = 248592|
public ArrayList<Customer> getClist() {
area_magnitude= km² |
return clist;
area_total = |
}
area_telephone = 0816 |
public void setClist(ArrayList<Customer> clist) {
postal_code = 572101|
this.clist = clist;
vehicle_code_range = KA-06 |
}
sex_ratio = |
public ArrayList<Product> getPlist() {
unlocode = |
return plist;
website = |
}
footnotes = |
public void setPlist(ArrayList<Product> plist) {
}}
this.plist = plist;

}
'''Tumkur''' ({{Lang-kn|ತುಮಕೂರು}}, ''Tumakuru'') is one of the busiest industrial towns located in the state of [[Karnataka]]. Since 28 August 2010, Tumkur has been accorded the status of a Corporation city. It is situated at a distance of 70 kilometers north west of the city of [[Bangalore]] along National Highway 4. It is the headquarters of [[Tumkur district]].
RetailStore(String storeName)

{
[[Amarashilpi Jakanachari]], a legendary sculptor credited with building many fine temples for the [[Kalyani Chalukyas]] and [[Hoysalas]], including the famous sculptures at [[Belur]] and [[Halebidu]] was born in a small village called [[Kaidala]], 9&nbsp;km from Tumkur.
this.storeName=storeName;

==The name==
}
Etymologically '''Tumakuru''' is believed to have been mutated possibly from "Tumbe ooru" due to the abundance of Tumbe huuvu, a kind of flower, or Tamate ooru due to the folk musical percussion instrument Tamate, that might have been used most here. Also, it is called as the coconut city.

public int generateCustomerID()
Another story says that during the rule of cholas Gulur was their capital, since tumkur is at high elevation the guards used to be there on any hill with Tumaki (a kind of drum) and used to make sound in case of any alerts. Hence the name Tumakuru
{

customerid++;
return customerid;

}
•Tumkur.(dt.hq and tq.hq) also called Tummegooru in certain inscriptions of the 10th century appears to have derived the name from the plant tumbe. Another derivation of the name suggested is from tumke, a small drum.

public int generateProductID()
• It is about 70&nbsp;km north-west of Bangalore and is connected by rail and road.
{

productid++;
•It is prettily situated on the north-western base of the Devarayanadurga group of hills on an elevated ground near the water-weir of a large tank. The place is a commercial, educational and industrial centre. Kante Arasu of Kaidala is said to have formed the present town consisting of a fort, the walls of which have now been leveled and a pete to the east of it.
return productid;

}
•There are over 40 temples dedicated to various Hindu deities, nine mosques and three churches.

public void addCustomer(String name,int contactNo){
•Of these, the oldest and the largest is the '''Lakshmikanthaswamy''' said to have been constructed during the Vijayanagara days, having an inscription of 1560. It is of Dravidian style of architecture and consists of garbhagriha, a shukanasi, a mukhamantapa and a prakara. The image of the god shown sitting with Lakshmi is about 1.5 metres high.
int customerid=generateCustomerID();

Customer c=new Customer(customerid, name, contactNo);
• Other places of note in the taluk are as follows:
clist.add(c);

}
•Gulur: about 6&nbsp;km south of Tumkur town, along with the present Kaidala formed a part of Kridapura. The place is associated with Siddhaveeranacharya, a noted author of many works including Shunya Sampadane. It is well known for the huge Ganesha image made in clay every year and also for the annual jatra held in honour of that deity on the third day after Kartika.

public void addProduct(String name,double price){
• Kaidala: about 5&nbsp;km south-west of Tumkur and one km west of Gulur, appears to have been formerly the capital of a petty State and is said to have borne the name of Kridapura.
int productid=generateProductID();

Product p=new Product(productid, name, price);
•According to a legend, it was the native place of Jakanachari, the famous architect and sculptor. Jakanachari is believed to have regained his hand which he had cut off at Belur due to his bad workmanship. Thus the place is called Kaidala (kai being hand).
plist.add(p);

}
•The Chennakeshava temple at this place is a large building of the Hoysala style with a mahadwara surmounted by a gopura built in the Vijayanagara style. The image of Chennakeshava, also called Channigaraya, faces west and is about 1.8 metres high. A fine figure with folded hands wearing an uttariya (upper cloth) and a dagger in this temple is said to represent the celebrated sculptor Jakanachari. But the truth appears to be that it represents a chief who caused the temple or the mahadwara to be erected.

public int checkProductAvailability(String ProductName){
•The Gangeshvara temple also called Gangadhareshvara contains inscriptions stating that this and the Narayana temples were erected 1150 A.D. by a chief named Gule Bachi during the Hoysala king Narasimha. Shilpi (Meaning Sculptor) Nanjappa is a well known artisan of Tumkur. His family origins might be from Andhra Pradesh. Shilpi Nanjappa was a sculptor, physcicist, bureaucrat and astronomer. He has also constructed several temples around Tumkur.
int count=0;

for(Product p:plist){
•Siddhaganga: about 4&nbsp;km east of Tumkur town and about one km from Kyatsandra attracts a large number of visitors. On a hillock are a temple of Siddhalingeshvara and a natural sacred spring called the Siddaganga. Six small shrines have been built at the entrance to the temple by a devotee of the matha. The celebrated Veerashiva matha which is amidst beautiful natural surroundings is running many educational institutions. A large number of students in the hostel are fed freely without any distinction of caste or creed.
if(p.productName.equalsIgnoreCase(ProductName) && p.productStatus.equalsIgnoreCase("available"))

count++;
(Source: Karnataka State Gazetteer 1983)

}
==Geography==
return count;
Tumkur is located at {{Coord|13.34|N|77.1|E|}}.<ref>[http://www.fallingrain.com/world/IN/19/Tumkur.html Falling Rain Genomics, Inc - Tumkur]</ref> It has an average elevation of 822&nbsp;metres (2696&nbsp;feet).
}
The city has a station on the Southern railway, 43 m. N.W. from Bangalore.

public int bookProduct(int CustomerID,String ProductName, int NumberOfProduct) {
==Demographics==
int flag1=0,flag2=0;
{{As of|2001}} India [[census]],<ref>{{GR|India}}</ref> Tumkur had a population of 248,592. Males constitute 52% of the population and females 48%. Tumkur has an average literacy rate of 75%, higher than the national average of 59.5%: male literacy is 79%, and female literacy is 70%. About 11% of the population is under 6 years of age.
Customer customer=null;

The cultivated products consist chiefly of millet, rice, pulses, arecanut and oil seeds. The chief industries are the making of coarse cotton cloths, woolen blankets, ropes, watches(Hindustan Machine Tools),. WIPRO, TVSE and Karmobiles Ltd. which is merged with Rane Madras. "Tumkur Glow for Beauty Crowns" SWARNMANDIR has been chiselling out the intricate nuances of gold crowns for Miss India-Universe, Miss India-World and Miss India-Earth Sponsored by TANISHQ, have their industries around the town.In 2011 this city is proposed to become a [[Municipal Corporation]] of [[Karnataka]].
for(Customer c:clist)

if(c.getCustomerID()==CustomerID){
Two National Highways NH-4 and NH-206 passes through Tumkur city.
customer=c;

flag1=1;
==Educational institutions in Tumkur==
break;

}
* Shridevi Group Of Educational Institutions
* Siddaganga Group Of Educational Institutions
for(Product p:plist){
* Sri Siddharatha Group Of Educational Institutions
if(p.productName.equalsIgnoreCase(ProductName)){
* H.M.S Group Of Educational Institutions
flag2=1;
* CIT Group Of Educational Institutions
break;
* Akshaya Group of Educational Institutions
}
* Sacred Heart Group Of Educational Institutions
}
* Sarvodaya Group Of Educational Institutions
* St.Joseph's Group Of Educational Institutions
if(flag1==0)
* sri Sapthagiri Education Trust
return 0;
* Sri Maruthi Education Trust
if(flag2==0)
* Vidyaniketan Group of Educational Institutions
return -1;
* Vidyodaya Foundation (R)
* Kautilya Academy of Management
int availability=checkProductAvailability(ProductName);
* sri vidyavahini group of institutions
int count=0;
* Maruthi public school,(MPS) Melekote
if(NumberOfProduct<availability){

for(Product p:plist){
==References==
if(p.productName.equalsIgnoreCase(ProductName) && p.productStatus.equalsIgnoreCase("Available")){
{{Reflist}}
count++;

customer.addBookedProduct(p);
[[Category:Cities and towns in Tumkur district]]
if(count==NumberOfProduct)

break;
[[bn:তুমকুর]]
}
[[ca:Tumkur]]
[[de:Tumkur]]
}
[[es:Tumkur]]
}
[[fa:تومکور]]
else{
[[fr:Tumkur]]
for(Product p:plist){
[[bpy:তুমকুর]]
if(p.productName.equalsIgnoreCase(ProductName) && p.productStatus.equalsIgnoreCase("Available")){
[[it:Tumkur]]
customer.addBookedProduct(p);
[[kn:ತುಮಕೂರು]]
count++;
[[mr:तुमकूर]]
}
[[pnb:ٹمکر]]
}
[[ru:Тумкур]]
[[sa:तुमकूरुमण्डलम्]]
}
[[sv:Tumkur]]
return count;
[[ta:தும்கூர்]]
}
[[te:తుమకూరు]]
[[vi:Tumkur]]
public double calculateNetAmount(int customerID,double discount){
[[war:Tumkur]]
double total=0;
[[zh:杜姆古尔]]
Customer customer=null;
for(Customer c:clist)
if(c.customerID==customerID)
customer=c;
for(Product p:customer.bookedProductList)
total+=p.productPrice;
total=total-(total*(discount/100));
return total;
}
}

Revision as of 14:16, 23 January 2012

import java.util.*; public class RetailStore {

private String storeName;
private ArrayList<Customer> clist=new ArrayList<Customer>();
private ArrayList<Product> plist=new ArrayList<Product>();
private static int productid=0,customerid=0;


public String getStoreName() {
 return storeName;
}
public void setStoreName(String storeName) {
 this.storeName = storeName;
}
public ArrayList<Customer> getClist() {
 return clist;
}
public void setClist(ArrayList<Customer> clist) {
 this.clist = clist;
}
public ArrayList<Product> getPlist() {
 return plist;
}
public void setPlist(ArrayList<Product> plist) {
 this.plist = plist;
}
RetailStore(String storeName)
{
 this.storeName=storeName;
 
}
  
   public int generateCustomerID() 
   {
    customerid++;
    return customerid;
   }
   
   public int generateProductID() 
   {
    productid++;
    return productid;
   }
   
   public void addCustomer(String name,int contactNo){
    int customerid=generateCustomerID();
    Customer c=new Customer(customerid, name, contactNo);
    clist.add(c);
   }
   
   public void addProduct(String name,double price){
    int productid=generateProductID();
    Product p=new Product(productid, name, price);
    plist.add(p);
   }
   
   public int checkProductAvailability(String ProductName){
    int count=0;
    for(Product p:plist){
     if(p.productName.equalsIgnoreCase(ProductName) && p.productStatus.equalsIgnoreCase("available"))
      count++;
     
    }
    return count;
   }
   
   public int bookProduct(int CustomerID,String ProductName, int NumberOfProduct) {
    int flag1=0,flag2=0;
    Customer customer=null;
    
    for(Customer c:clist)
     if(c.getCustomerID()==CustomerID){
      customer=c;
      flag1=1;
      break;
     }
    
    for(Product p:plist){
     if(p.productName.equalsIgnoreCase(ProductName)){
      flag2=1;
      break;
     }
    }
    
    if(flag1==0)
     return 0;
    if(flag2==0)
     return -1;
    
    int availability=checkProductAvailability(ProductName);
    int count=0;
    if(NumberOfProduct<availability){
     for(Product p:plist){
      if(p.productName.equalsIgnoreCase(ProductName) && p.productStatus.equalsIgnoreCase("Available")){
       count++;
       customer.addBookedProduct(p);
       if(count==NumberOfProduct)
        break;
      }
       
     }
    }
    else{
     for(Product p:plist){
      if(p.productName.equalsIgnoreCase(ProductName) && p.productStatus.equalsIgnoreCase("Available")){
       customer.addBookedProduct(p);
       count++;
     }
    }
     
   }
   return count;
   }
   
   public double calculateNetAmount(int customerID,double discount){
    double total=0;
    Customer customer=null;
    for(Customer c:clist)
     if(c.customerID==customerID)
      customer=c;
    
    for(Product p:customer.bookedProductList)
     total+=p.productPrice;
    
    total=total-(total*(discount/100));
    return total;
   }

}