Question 2 Three (3) candidates have been short listed for Multimedia Club president. Every member of the club needs to

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 2 Three (3) candidates have been short listed for Multimedia Club president. Every member of the club needs to

Post by answerhappygod »

Question 2 Three 3 Candidates Have Been Short Listed For Multimedia Club President Every Member Of The Club Needs To 1
Question 2 Three 3 Candidates Have Been Short Listed For Multimedia Club President Every Member Of The Club Needs To 1 (64.44 KiB) Viewed 75 times
Question 2 Three (3) candidates have been short listed for Multimedia Club president. Every member of the club needs to vote only one candidate for the post. Every vote will be kept in a file name President.dat. Example of input file is as shown in Figure 2 which consists of serial polling number and the chosen candidate's name. Write a program to read the content of this file and then calculate and display the total votes for each candidate. Lastly display the candidate's that name has been elected to be the president. You are required to use at least three (3) functions in this program. (Seramai tiga(3) calon pelajar telah disenarai pendekkan untuk jawatan presiden Persatuan Multimedia. Pengundian dilakukan iaitu setiap ahli persatuan perlu memilih hanya seorang calon untuk jawatan presiden ini. Setiap undian disimpan di dalam fail bernama Presiden.dat. Contoh fail input adalah seperti yang ditunjukkan dalam Figure 2 yang terdiri daripada nombor siri undian dan juga nama calon yang dipilih. Tuliskan atur cara untuk membaca kandungan fail President dat dan seterusnya mengira dan mencetak jumlah keseluruhan undian bagi setiap calon. Akhir sekali cetak nama calon yang terpilih sebagai presiden persatuan. Anda dikehendaki menggunakan sekurang-kurangkan tiga(3) fungsi dalam atur cara ini. Polling serial number S0001 S0002 S0003 S0004 S0005 S0006 : : : S0100 Rahman Adam MTS3063: Principles of Programming All Adam Adam Rahman : 3 2 Rahman Chosen candidate Figure 2: Example of Content of input file President.dat [See next page b) Write a complete C++ program for the given problem. (Tulis atur cara C++ yang lengkap bagi masalah yang diberi.) 10 a) Analyze the given problem and identify what is the input, output and process. (Analisis masalah yang diberi dan kenal pasti apakah input, output dan proses.) 15 marks] [20 marks]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply