Assignment title: C Programming
C# Programming
Q
Context:
This assignment is about developing and using services in C#. The programming language for this assignment is strictly C#. Marking will consider good coding style (comments in your code, proper indentation, good structuring of the code, choosing appropriate C# types and constructs, good OO
design, etc.) and marks will be deducted for bad style. As database I like you to use MySQL as explored in the lab work.
Tasks:
1) Develop a simple database for books (type, title, ISBN, author, summary) and insert a few items. [type will be fiction or non-fiction; Enter all titles in UPPERCASE]
2) Develop classes for books. We like to have two classes, one for fiction and one for nonfiction; these will differ in their ToString method: non-fiction books will show the summary, but fiction ones will not (just in case it gives away too much of the plot!). You might need extra classes and you should consider how to use object-oriented concepts to best solve this.
3) Develop a WCF service that offers operations to
a. Search for a book by title (no other searches are needed).
b. Enter a book into the database (assume that all data will be provided).
c. Show how many fiction and non-fiction books are in the database.
4) Develop a client console application that has the following features:
a. It has a textual menu to choose to a) search for a book, b) enter a new book or c)
show how many books exist. This will be used to invoke one of the following functionalities. Obviously users should be returned to the menu after running one of
the operations.
b. Search: Gathers a title from the user, invokes the UpperOperator from the SOAP
service at https://campus.cs.le.ac.uk/tyche/ws--temp/UpperOperator.wsdl
to convert the title to upper case before using the service from 3)a. to search and finallydisplays the result on screen.
c. AddNew: Gathers book information from the user, converts the title to uppercase
(use the service) and then inserts the book into the database using the service from
3)b.
d. Count: Displays how many book of each type are in the database with values
obtained through the service from 3)c.
Note:
Please note that we are not expecting you to make things too complicated; focus on the right structures and the web service related parts. Do not spend much time on creating complex user interfaces. Also, do not spend time on error handling (you can assume for the purpose of this exercise that users will enter the right type of data).
Your submission should include:
• A zip archive containing the folder tree with your solution (so the folder that contains the .sln file and all subtrees thereof).
• A description (typed into the submissions text box in blackboard) which tells me which
tasks you have attempted and in which files the tasks are addressed. This should also
contain the Create Table statement(s) for your database. It is essential that you include the description in this way.