Question: 1 public class Accumulator 2 { 3 private double total: 4 private int N: 5 } 6 7 public class Transaction 8 { 9 private

 1 public class Accumulator 2 { 3 private double total: 4

1 public class Accumulator 2 { 3 private double total: 4 private int N: 5 } 6 7 public class Transaction 8 { 9 private final String who: 10 private final Date when: 11 private final double amount: 12 } 13 14 public class FixedCapacityStackOfStrings 15 { 16 private String [] a = new String [C]: // stack entries 17 private int N: // size 18 } 21 22 class INode implements Comparable 23 { 24 protected byte() name: 25 protected long modificationTime: 26 protected long accessTime: 27 } 28 29 class INodeFile extends INode { 30 private long header: 31 private Block [] blocks: 32 } 33 34 class INodeDirectory extends INode 35 { 36 private INodeFile [] children: 37 } 38 39 public class Block implements Comparable 40 { 41 private long blockId: 42 private long numBytes: 43 private long generationStamp: 44 } Assuming a 64-bit CPU architecture and Java 7, given the class definitions described in Listing 1 compute the amount of memory needed by each of the following objects considering their respective assumptions: Question: 1. Accumulator size is ? 2. Transaction size is ? Please write at least 50 words to explain their sizes. Also: note that in all of your calculations you should assume a 64-bit CPU architecture and Java 7. Don't forget to consider the padding in your calculation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!