Answer:
The method in Java is as follows:
public static ArrayList<Integer> appendPosSum(ArrayList<Integer> nums) {
    int sum = 0;
    ArrayList<Integer> newArr = new ArrayList<>();
    for(int num : nums) {
        if(num>0){
            sum+=num;
            newArr.add(num);        }    }
    newArr.add(sum);
    return newArr;
  }
Explanation:
This defines the method; it receives an integer arraylist as its parameter; nums
public static ArrayList<Integer> appendPosSum(ArrayList<Integer> nums) {
This initializes sum to 0
    int sum = 0;
This declares a new integer arraylist; newArr
    ArrayList<Integer> newArr = new ArrayList<>();
This iterates through nums
    for(int num : nums) {
If current element is greater than 0
        if(num>0){
This sum is taken
            sum+=num;
And the element is added to newArr
            newArr.add(num);        }    }
At the end of the iteration; this adds the calculated sum to newArr   
 newArr.add(sum);
This returns newArr
    return newArr;
  }
 
        
             
        
        
        
The question is incomplete. The complete question could be found here: https://www.coursehero.com/file/p655c1i/a-Maintaining-privacy-of-the-information-stored-in-the-data-set-b-Scalability/
Answer:
B. Generally speaking, since 2009 more people use "red" in their search terms more than they use "blue", "yellow", "green", or "purple."
Explanation:
Based on the data provided in the figure, it can be inferred that the color 'red' was used the most in the search terms compared with the other colors such as purple or green. The other colors were also used in the search terms on google, however, the trend of those that used the color 'red' in the search terms is the highest. 
 
        
             
        
        
        
Explanation:
Both Primary Key and Candidate Key are the attributes that are used to access tuples from a table. These (Primary key and Candidate key) are also can be used to create a relationship between two tables.
- A Candidate Key can be any column or a combination of columns that can qualify as a unique key in the database. Each Candidate Key can qualify as a Primary Key.
 - A Primary Key is a column or a combination of columns that uniquely identify a record. The primary key is a minimal super key, so there is one and only one primary key in any relationship.
 
<em> The main difference between them is that a primary key is unique but there can be many candidate keys. </em>
I hope you find this information useful and interesting! Good luck!