Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 1: Create an annotated UML diagram of the VoteCounter project 1. In your sketchbook, create a UML diagram of the VoteCounter project. Thediagram needs
Part 1: Create an annotated UML diagram of the VoteCounter project 1. In your sketchbook, create a UML diagram of the VoteCounter project. Thediagram needs to show the four classes. Each class should follow this template: Class name at the top. ClassName Dividing line. privateField1 : String - privateField2 : int - private Field3 : char + publicField1 : bool Fields/Properties, each followed by their type and each preceded by -/+ indicating private/public. Dividing line. + constructorName - private Method1(int) : void - private Method21): int + publicMethod 1(int,char): char + public Method2(): bool + public Method3(): String + publicMethod4(String): void Methods, similar to the fields, but with the addition of the list of parameter types. Navigator Members SithSenate Member SithSenate Member(String surname) add Vote getFullName : String getNum Votes: int getSurname(): String numVotes : int surname : String title : String Hint: if you open each of the four classes and look at the bottom left corner of the NetBeans window, you should see all the information you need in the Navigator pane (though this pane lists methods above fields) | Note: you do not need to do UML diagrams for the testing files. 2. Draw lines between the four class boxes, indicating which classes use which other classes. For example, you should have an arrow (labeled 'uses') from ArrayVoteCounter pointing to SithSenateMember , since the ArrayVoteCounter class creates SithSenateMember objects. There should be no line from VoteCounter Project to SithSenateMember, since VoteCounter Project does not directly instantiate any SithSenate Member objects. 3. Now, annotate the UML diagram by writing a brief (one to two bullet point notes)about each class and what it does). 4. When you are done, take a picture of your UML diagram and save it with the other screenshots for this project. You'll be submitting this along with your code in a zip to Canvas. Navigator X Members ArrayListVoteCounter ArrayListVoteCounter expandCapacity (String: myArray): String generateRandomElectionData getSithSenateMemberVotes(String name) : int getSpoiledVotes(): ArrayList getVotes: ArrayList recordVote(String name) reportResults runRandomElection Results setupCandidates sithSenateMembers : SithSenateMember spoiledVoteIndex : int spoiled Votes: ArrayList voteIndex : int votes : ArrayList 19 Navigator X Members ArrayVoteCounter ArrayVoteCounter expandCapacity (StringmyArray) : String generateRandomElectionData getMemberVotes(String name): int getSpoiledVotes0 : String getVoteIndex(): int getVotes(): Stringi recordVote(String name) reportResults runRandomElection Results setupCandidates sithSenateMembers : SithSenateMember spoiledVoteIndex : int spoiledvotes : Stringi voteIndex : int votes : String Navigator X Members SithSenateMember SithSenateMember(String surname) addvote getFullName( : String getNumVotes(): int getSurname(): String numVotes: int surname : String title : String Navigator X Members VoteCounter Project main(String args)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started