avatar
plastiq and ink preferred# Money - 海外理财
b*y
1
我多年不用Java了,不太灵光了。对熟悉的牛们,应该不难。
Suppose that your boss walks in one day and drops the following code on your
desk. Your
asked to spend an hour or two and improve the quality of the code. What
would you suggest
to improve this? Each suggested improvement, comment, or observation can get
you extra
credit. If you have any questions, please make note of them as part of your
feedback!
Creativity is a plus.
Don't write any code! Just put your commentary inline, kind of a stream-of-
concisousness
approach.
class Person
{
public static Vector getPeople()
{
return people;
}
protected static Vector people = new Vector();
private String fName = "";
private String fAddress = "";
public Person (String name, String address)
{
if (name.length() == 0)
throw new IllegalArgumentException ("Person needs a non-blank name");
if (address.length() == 0)
throw new IllegalArgumentException ("Person needs a non-blank
address");
fName = name;
fAddress = address;
people.add (this);
initialize ();
}
protected void initialize ()
{
...;
}
public void store ()
{
try
{
String data = stringify ();
...;
}
catch (Exception e)
{
e.printStackTrace();
}
}
private String stringify ()
{
String result = "";
result += name;
// String[] items = address.split ("\s+", -2);
// for (int i = 0; i< items.length; i++)
// {
// result += "|";
// result += items[i];
// }
result += "|";
result += address;
return result;
}
}
class Customer extends Person
{
public static int BasicAcct = 0;
public static int PlusAcct = 1;
public static int ExecAcct = 2;
private long _accountid = 0;
private int _accounttype = 0;
public Customer (String name, String address)
{
super (name, address);
_accounttype = BasicAcct;
_accountid = IDManager.getId ();
}
protected void initialize ()
{
super.initialize ();
_accounttype = PlusAcct;
}
public void putAccountType (int acct)
{
_accounttype = acct;
}
public long getAccountId ()
{
return _accountid;
}
}
avatar
J*X
2
据说ink preferred用plastiq付房贷目前还享受3% points。
请问车贷也有吗,thanks
avatar
l*a
3
什么厂啊?

your
get
your

【在 b*******y 的大作中提到】
: 我多年不用Java了,不太灵光了。对熟悉的牛们,应该不难。
: Suppose that your boss walks in one day and drops the following code on your
: desk. Your
: asked to spend an hour or two and improve the quality of the code. What
: would you suggest
: to improve this? Each suggested improvement, comment, or observation can get
: you extra
: credit. If you have any questions, please make note of them as part of your
: feedback!
: Creativity is a plus.

avatar
J*X
4
我刚才试了一下,发下ink preferred都加不上了。所谓的3%应该都是以前加好的吧?
avatar
t*r
5
问题太多了。呵呵。
一句话评语:shit code. fire the author and rewrite it
avatar
b*i
6
1个月前加过ink preferred,只是plastiq不让用visa卡付房贷,但是可以付其他账单。

【在 J*X 的大作中提到】
: 我刚才试了一下,发下ink preferred都加不上了。所谓的3%应该都是以前加好的吧?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。