Get Instant Help From 5000+ Experts For

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
Designing Voting System: JSON and XML Approach


In the above model, Voters are eligible to vote on a Motion or delegate their vote if

• They have a Voting Record for the Motion

• They have not voted on the Motion

• They have not delegated their vote on this Motion


The assignment consists of two parts. The solutions to 1, 2 in Part A are independent of the solutions for 3-6 in Part B. While both parts start from the same class  model and overall requirements, they are concerned with different operations and target different languages.

Therefore, your design decisions in Part A and B can be different, too. Part A: JSON

1. Create a sample JSON object to return voting records for 2 motions as a result of an invocation of getVotingRecords(v). The records should show that the voter voted yes on the first Motion, did not vote on the second one, but delegated this vote. Your solution should be based on the given class diagram.

2. Validate your JSON object at and use the online tool to generated a class diagram. Copy the generated class diagram  into your submission document and compare it to the given class diagram. In particular, comment on the following questions, justifying your claims.

a. What are the differences between the given and the generated class diagrams? How are these differences justified?

b. What is the structure of the mapping used?

c. Is data capacity extended, reflected, preserved?

d. Does the mapping create redundancy? If yes, is there a way to avoid it and

Can you demonstrate a redundancy free mapping using the example JSON object from 1?

3. In order to map the delegation relation between voters, operation getAllDelegations() :Set allows to download a record of all delegations as an XML document. You are requested to design an XML data format, derive and test a DTD to support the encoding of the relevant data satisfying these requirements, following these steps. Reduce the class diagram to those classes and attributes, associations and cardinalities required by the scenario. Justify for every element of the classdiagram your decision to keep or drop it, always referring to the requirements of the scenario.

4. Create an XML-specific class diagram and justify the chosen document structure using the requirements from the scenario.

5. Derive the DTD and justify the style of mapping for the attributes you have chosen. Is the mapping from the class diagram in 2 to the DTD data preserving? Please justify your answer. In particular

a. If the mapping does not increase data capacity, provide a valid object diagram as counterexample and explain why there is no corresponding valid XML instance.

b. If the mapping does not reflect data capacity, provide a valid XML instance as counterexample and explain why there is no corresponding valid object diagram.

6. Create a valid object diagram with a cyclic delegation between two Voters.

Submission and Mark Distributions

Submit by midnight (23.59) on Thursday, 28th February through TurnitIn via the module’s BlackBoard site.

Upload a single pdf document containing all your answers with the completed coursework cover sheet as first page. This is individual work for 20% of the overall module mark. No hand-written solutions please - use editors for diagrams and text.

The assignment contains a mix of basic, advanced and challenging questions. Jointly the basic elements allow a pass mark (> 50%) while basic + advanced components are worth 80%. The challenge question is more open-ended, requiring your own judgment and reflection on the properties of different solutions.


sales chat
sales chat