我需要一些使用java的想法 [英] i need some idea using java

查看:83
本文介绍了我需要一些使用java的想法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,



假设您有居住在伦敦,巴黎,莫斯科和纽约城市的约翰,玛丽,彼得,艾伦,安娜和詹姆斯的人并驾驶使用这些交通工具私家车,火车,自行车,步行和公共汽车,并做他们赚取各种薪级的职员,牙医,艺术家和音乐家的工作。



我想更多地根据与他们相关的信息来关联/显示每个人。以下是我刚创建的3个表格,以便于查看适用于这些人员的数据。我还在表格下方创建了3个示例类,以便我们可以看到每个人应该显示的数据。我相信这些可以很好地了解如何将数据传递到其他类的方法中



 PERSON 
--- ----------
姓名工作城市优先运输
John Clerk伦敦5000私家车
玛丽牙医巴黎10000火车
彼得艺术家巴黎7000自行车
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
----- -------
城市名称运输可用成本


Londo n火车5
巴黎巴士10
纽约火车8
莫斯科船2










运输
--------------------
运输速度

火车平均价格
巴士快速
船慢





我创建了3个班级只是为了保存数据/方法如下:



  class 人{

字符串名称;
string City;
字符串作业;
double 工资;
string preferredTransport;
string availableTransport;
string transportSpeed;

}


class 运输{

string transportationMode;
string howSafe;


}

class 城市{

string cityName;
string transportationModeAvailable;
double transportationCost;

}





请评估这个我需要解决这个问题的想法

解决方案

我有解决方案:



http://www.amazon.com/Java -Dummies-Burd / dp / 0470371730 / ref = sr_1_3?s = books& ie = UTF8& qid = 1391695198& sr = 1-3& keywords = java + for + dummies [ ^ ]



; - )


http://docs.oracle.com/javase/tutorial/index.html [ ^ ]。

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

解决方案

I have the solution for you:

http://www.amazon.com/Java-Dummies-Burd/dp/0470371730/ref=sr_1_3?s=books&ie=UTF8&qid=1391695198&sr=1-3&keywords=java+for+dummies[^]

;-)


Start at http://docs.oracle.com/javase/tutorial/index.html[^].


这篇关于我需要一些使用java的想法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆