Dear all,
Suppose you have persons John, Mary, Peter, Alan, Anna and James who live in the cities London, Paris, Moscow and New York and drive use these modes of transportation Private Car, Train, Bicycle, walking and bus and do the jobs of clerk, dentist, artist, and musician for which they earn various salary scales.
I want to work more on associating/displaying each person based on the information that relate to them. Below are 3 tables I just created to make it easy to view the data applicable to these persons. I also created 3 sample classes below the tables so we can see the data we should display for each person. These I believe give a good idea of how you can pass data into methods of other classes
PERSON
-------------
NAME Job CITY SALARY PREFERRED TRANSPORTATION
John Clerk London 5000 Private Car
Mary Dentist Paris 10000 Train
Peter Artist Paris 7000 Bicycle
Alan Clerk New York 2000 Train
Anna Musician Londo 15000 Walking
James Unemployed Moscow 0 Bus
Tony Artist London 3500 Motor Bike
Julie Nurse New York 3000 Bus
CITY
------------
CITY NAME TRANSPORTATION AVAILABLE COST
London Train 5
Paris Bus 10
New York Train 8
Moscow Boat 2
TRANSPORTATION
--------------------
TRANSPORTATION SPEED
Train Average
Bus Fast
Boat Slow
I have created 3 classes just to hold the data/methods as below:
class Person{
string name;
string City;
string job;
double salary;
string preferredTransport;
string availableTransport;
string transportSpeed;
}
class Transportation{
string transportationMode;
string howSafe;
}
class City{
string cityName;
string transportationModeAvailable;
double transportationCost ;
}
Kindly evaluate this i need to idea to solve this problem