Earn Higher Grades With Instant Assignment Help.Ask Question!

Computer Science
(5/5)

client-server system for a hypothetical banking application, the clients are ATM machines, and the server is the bank server.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Question#1: (4 points)

In a client-server system for a hypothetical banking application, the clients are ATM machines, and the server is the bank server. Suppose that the client has two operations: withdraw and deposit. Use the broker architectural pattern to document an initial architecture design for this system:

  • Draw a class diagram for this system. Use a client-side proxy to encrypt the data using an encrypt operation, and use a server side proxy to decrypt the
  • Draw a sequence diagram for this
  • Suppose that we want greater availability of the server, discuss what kind of tactics you should use to achieve

 

Question#2: (4 points)

 

You are given a class that processes the purchases for an online store. The class receives calls to retrieve the prices for items from a database, records the sold items, updates the database, and refreshes the webpage. What architectural pattern is suitable for this? Illustrate your answer by drawing a model for the solution, showing the method calls/events. Comment on how applying the pattern will impact the modifiability of the system.

 

Question#3: (4 points)

 

A “Personal Address Book” application program allows the user to add, delete, search, save and load her contact information. The program separates user (command-line) interface and internal processing subsystem. The internal processing system consists of the following classes: ContactManager (responsible for add and delete operations), ContactFinder (responsible for search operation), and DataManager (responsible for save and load operations).

 

  • What design pattern can be used to implement the user interface? Explain your answer using class diagram for the entire

 

  • Draw an UML sequence diagram to show the behavioural view of the personal address book program that demonstrates what happens when a user enter a new contact

 

Question#4: (4 points)

 

In a system comprising of 3 components: A, B, C. Calling A requires calling B, and calling B requires calling A. Component C is responsible for tasks T#1, T#2, and T#3.

Comment on the modifiability of this system. What are the problems that you see in this system, and how you solve them?

 

Suppose that T#1 is performed by both component A and C? What does it say about A and C? How you solve this problem?

 

Question#5: (3 points)

 

Write a performance scenario for the Trent Course Registration System. Suppose that this system uses a client-server architecture. Think about whether your major concern is latency, throughput, or some other response measure. What tactics you will use to mitigate these issues. Elaborate your answer using examples.

Questions#6: (3 points)

Think about security scenarios for an automatic teller machine (ATM). How would you modify your design for ATM to satisfy one particular scenario? Choose one concrete security scenario to answer this question.

 

 

 

Question#8: (4 points)

 

Write JUnit test cases for setLoanAmount (to test the Exception) and getMonthlyPayment.

 

public class Loan {

private double annualInterestRate; private int numberOfYears;

private double loanAmount; private java.util.Date loanDate;

 

/** Default constructor */ public Loan() {

this(2.5, 1, 1000);

}

 

/** Construct a loan with specified annual interest rate, number of years, and loan amount

*/

public Loan(double annualInterestRate, int numberOfYears, double loanAmount) {

this.annualInterestRate = annualInterestRate; this.numberOfYears = numberOfYears; this.loanAmount = loanAmount;

loanDate = new java.util.Date();

}

 

/** Return annualInterestRate */

public double getAnnualInterestRate() { return annualInterestRate;

}

 

/** Set a new annualInterestRate */

public void setAnnualInterestRate(double annualInterestRate) { this.annualInterestRate = annualInterestRate;

}

 

/** Return numberOfYears */ public int getNumberOfYears() {

return numberOfYears;

}

 

/** Set a new numberOfYears */

public void setNumberOfYears(int numberOfYears) { this.numberOfYears = numberOfYears;

}

 

/** Return loanAmount */

public double getLoanAmount() { return loanAmount;

}

 

/** Set a newloanAmount */

public void setLoanAmount(double loanAmount) throws Exception{ if (loanAmount < 0)

throw new Exception("Money cannot be negative"); this.loanAmount = loanAmount;

}

 

/** Find monthly payment */

public double getMonthlyPayment() {

double monthlyInterestRate = annualInterestRate / 1200;

double monthlyPayment = loanAmount * monthlyInterestRate / (1 - (1 / Math.pow(1 + monthlyInterestRate, numberOfYears * 12)));

return monthlyPayment;

}

 

/** Find total payment */

public double getTotalPayment() {

double totalPayment = getMonthlyPayment() * numberOfYears * 12; return totalPayment;

}

 

/** Return loan date */

public java.util.Date getLoanDate() { return loanDate;

}

}

Attachments:
(5/5)

Expert's Answer

13 Times Downloaded

Related Questions

CSI 1420 Introduction to C Programming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu

The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

13 Times Downloads

Ask This Assignment To Be Done By Our ExpertsGet A+ Grade Solution Guaranteed

expert
joyComputer science
(4/5)
12 Answers Hire Me
expert
Robert DLaw
(4.8/5)
533 Answers Hire Me
expert
Dr Samuel BarberaStatistics
(5/5)
963 Answers Hire Me
expert
Tutor For YouEconomics
(5/5)
850 Answers Hire Me