Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the automation program to be written for the election software, write separately the interface and code application of the Citizen class, which are necessary

image text in transcribedimage text in transcribed

In the automation program to be written for the election software, write separately the interface and code application of the Citizen class, which are necessary to model the voting citizens. The UML class diagram of the class to be designed is shown below. Just fill in the blanks without rewriting the main function Citizen name: String - birthplace: String? - birthYear: Integer - teno: String > + Citizen (a: String, d: String, y: Integer) > + Citizen ( + (b: Citizen): Boolean + setTCNO (s: String) + gettenthNumber () Integer10 + controlTCNO (): Boolean 7 1. Name and surname of the citizen. 2: Place of birth 3. It stores only the year of the birth date. 4: Citizen's TC ID number. TC ID numbers consist of 11 digits. Underlines or spaces can be put in between to make it easy to say and write. 5: Transfer the name, place of birth and year of birth information to the relevant members. Passes space ('') to the tcno member. 6. Passes null values to all members. It transfers zero (0) to numeric ones and spaces (****) to literal ones. 7: It writes the citizenship information on the screen as in the printout. 8. Returns the older of the two (sent with the summoned). Returns any of them if the values are the same. 9: Transfers the sent TCNO value to the tcno member. 10. Returns the TCNO information by calculating the tenth (10th) number that should be. The units digit of the sum of the first 9 digits of the TCNO information 7 times the odd row (1.3.,5.,7., and 9.) and 9 times the double row (2.4.,6., and 8.) gives the tenth (10th) digit. 11. Checks the TCNO information. Returns true if valid, false if invalid. If the tenth digit of the TCNO information calculated as above and the tenth number is the same, it is valid. If it is different, it is invalid. SAMPLE DRIVER PROGRAM ... // include class header file in code int main() { Citizen a ("Ali Gel", "Ankara", 2002); Citizen b ("Veli Git", "Bolu", 2012), c; // print out b's information // pass older than a and b to c. cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

2. Discuss the importance of popular culture as a public forum.

Answered: 1 week ago