Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Seneca College November 07 , 2018 Applied Arts & Technology SCHOOL OF COMPUTER STUDIES JAC444 Demo Due dates: Nov 12 and Nov 19, 2018 Final

Seneca CollegeNovember 07, 2018

Applied Arts & Technology

SCHOOL OF COMPUTER STUDIES

JAC444

Demo Due dates: Nov 12 and Nov 19, 2018

Final Code Submission Date: Nov 19, 2018

Workshop 4

Notes:

i.Each task should be presented during the lab, demo worth 70% of the workshop marks and code uploading worth the other 30%.

ii.At least one task should be demoed in Nov 12th lab and the other task should be demoed on Nov 19th (Student can choose any task they want to give demo about first).

iii.Make sure you have all security and check measures in place, like exceptional handling and wrong data types etc.

iv.Given output structure is just for student to have a glimpse what the output can look, student are free to make the output better in any way.

Other inputs can be given during demo, so make sure you test your program properly.

Task 1:

The popularity ranking of baby names from years 2001 to 2010 is downloaded from www.ssa.gov/oact/babynames and stored in files named babynameranking2001.txt, babynameranking2002.txt, . . . , babynameranking2010.txt. Each file contains one thousand lines. Each line contains a ranking, a boy's name, number for the boy's name, a girl's name, and number for the girl's name. For example, the first two lines in the file babynameranking2010.txt are as follows:

1. Jacob 21,875 Isabella 22,731

2. Ethan 17,866 Sophia 20,477

So, the boy's name Jacob and girl's name Isabella are ranked #1 and the boy's name Ethan and girl's name Sophia are ranked #2. 21,875 boys are named Jacob and 22,731 girls are named Isabella.

Write a program that prompts the user to enter the year, gender, and followed by a name, and displays the ranking of the name for the year. Here is a sample run:

Task 2: (Game - Connect four)

Connect four is a two-player board game in which the players alternately drop colored disks into a seven-column, six-row vertically suspended grid, as shown below.

The objective of the game is to connect four same-colored disks in a row, a column, or a diagonal before your opponent can do likewise. The program prompts two players to drop a red or yellow disk alternately. In the preceding figure, the red disk is shown in a dark color and the yellow in a light color. Whenever a disk is dropped, the program redisplays the board on the console and determines the status of the game (win, draw, or continue). Here is a sample run:

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions