\CodePro Analytix Evaluation\src\com\instantiations\example\account\Account.java
Violations: 0 high, 11 medium, 1 low
 
Violations
Missing file comment Missing Javadoc comment for field
Missing @version tag for type Account Private field should be final: balance
toString() is missing Missing Javadoc comment for method "Account"
Missing default constructor Invalid string literal: "USD"
Missing Javadoc comment for field Missing Javadoc comment for method "getOwner"
Private field should be final: owner Missing Javadoc comment for method "getBalance"
 
Source
1 package com.instantiations.example.account;
2
3 import com.instantiations.example.customer.*;
4 import com.instantiations.example.money.*;
5
6 /**
7  * The class <code>Account</code> exists primarily to create a cyclic dependency
8  * between the <code>account</code> and <code>customer</code> projects.
9  * @author Albert Adams
10  */
11 public class Account
12 {
13    private Customer owner;
14
15    private Money balance;
16
17    public Account(Customer owner)
18    {
19       this.owner = owner;
20       balance = new Money(0, "USD");
21    }
22
23    public Customer getOwner()
24    {
25       return owner;
26    }
27
28    public Money getBalance()
29    {
30       return balance;
31    }
32 }
Powered by CodePro AnalytiX