0
Reply

This is about writing programmes and Web Services in C#

ali mohamed

ali mohamed

Oct 21 2013 9:24 AM
882
This is about
writing programmes
and Web Services
in C#
:
1)
Develop a console programme that reads an integer
n
and a list of up to 5 divisors
(
also integers


from the console and computes the sum of all integers up to (but excluding) n which are
divisible by any of the five divisors. For example if
n
= 10, and the list of

divisors
provided is [3,
5] then the numbers divisible by 3 or 5 are 3, 5, 6, 9 and their sum is 23 and hence the output is
23.
Note that marks will be awarded for functionality of the solution but also for elegance of
handling input, both from a programming as we
ll as the user experience side (i.e. avoid asking
for unnecessary input!).


2)
Provide a Web Service for the programme in 1)

consider a suitable interface

3)
A bank has two types of accounts: Savings Accounts and Current Accounts. Both accounts
allow customers to deposit and withdraw money and have an account number as well as an
owner (a person name and address). However, they do behave differently in some aspects

Savings accounts do not allow users to withdraw more money than the current balance, but
accrue interest (that is when an interest amount is calculated it is added to the account). Current
accounts might have an overdraft facilities (that is a negative
balance up to which withdrawels
are permitted). The overdraft comes with a flat charge of
2
£ per day.
You
must develop a sensible class structure to capture these accounts and provide methods for
their specific features (
deposit
,
withdrawel
,
compute
_
in
terest
,
add
_
overdraft
_
charge
and
display
_
balance
).
Note that you do not need to handle
time, that is you can assume that the bank's final code will use the
compute
_
interest
method once a month and that the
add_overdraft_charge
method is used daily. You will
be assessed both on functionality as well as good object oriented design. Also note that you
should not use a database

this exercise is about OO design and implementation.
[
8
marks]
4)
Develop a web services
for the bank accounts
in the previous task. You will only need to
implement the methods relevant to clients:
deposit
,
withdrawel
and
display
_
balance
.
Note
that
you will need to decide on good
interfaces for your
web service methods