Sheridan College 1 Faculty of Applied Science & Technology School of Mechanical and Electrical Engineering Technology COURSE: ENGR11833D- Computer Programming LECTURER: Dr. Ameera Al-Karkhi ASSIGNMENT...

1 answer below »
do this assesment plz


Sheridan College 1 Faculty of Applied Science & Technology School of Mechanical and Electrical Engineering Technology COURSE: ENGR11833D- Computer Programming LECTURER: Dr. Ameera Al-Karkhi ASSIGNMENT PROJECT NUMBER: 1 ASSIGNMENT TYPE: (INDIVIDUAL) ISSUE DATE: 1st October 2021 SUBMISSION DATE: 22nd October 2021 PENALTIES FOR LATE HAND-IN: (after which maximum obtainable mark is 50%) ABSOLUTE DEADLINE: 22nd October 2021 (after which mark is 0%) PLAGIARISM: Students are reminded that plagiarism (copying) is a serious disciplinary matter. Checks are regularly made for misuse of the web and other existing materials. Sheridan College 2 Project 1- Computer Programming Course Introduction This project aims to help the student in practicing the fundamental of conditional statements (if/else and switch statements) and loops by designing and implementing a menu-driven program. A menu-driven program is a program that obtains input from a user by displaying a list of options (the menu) from which the user indicates their choices. The program has two levels of menus. At the top menu, your designed program asking the user to select a specific decade: the 1980s, the 1990s, or the 2000s as shown in the attached tables. After the user picks one option from 1, 2, 3 for the chosen decade or 4 to quit the program, another sub menu sends the program to the next level of menus. The user then gets information about for example sports (specifically baseball is selected in this application), the movies, or U.S. presidents (see the attached tables). Within each option section of code, a conditional test should be performed to the user’s entry to present the information they want to see. Objectives: ▪ To be familiar with different C statements and concepts, especially if and switch statements and Loops. ▪ To be familiar with syntax and structure of C-programming ▪ To learn problem solving techniques using C-programming Notes: ▪ Please follow the general reporting style, solution conventions and submission instructions as provided earlier. ▪ Students are encouraged to complete the related programming labs and exercises prior to solving this project. ▪ You would need to use exit(1) in your program and would require you to include #include . Requirements: ▪ Answer the following problem(s) in a project report document and upload to Slate. Include the design (text or flowcharts), codes and output screenshots of your solutions in your submission. Sheridan College 3 The 1980's (Baseball) The 1980's (The Movies) The 1980's (US Presidents) World Series Champions of the 1980s: 1980: Philadelphia Phillies 1981: Los Angeles Dodgers 1982: St. Louis Cardinals 1983: Baltimore Orioles 1984: Detroit Tigers 1985: Kansas City Royals 1986: New York Mets 1987: Minnesota Twins Oscar-Winning Movies in the 1980s: 1980: Ordinary People 1981: Chariots of Fire 1982: Gandhi 1983: Terms of Endearment 1984: Amadeus 1985: Out of Africa 1986: Platoon 1987: The Last Emperor 1988: Rain Man 1989: Driving Miss Daisy US Presidents in the 1980s: 1980: Jimmy Carter 1981-1988: Ronald Reagan 1989: George Bush The 2000's (Baseball) The 2000's (The Movies) The 2000's (US Presidents) World Series Champions of the 2000s: 2000: New York Yankees 2001: Arizona Diamondbacks 2002: Anaheim Angels 2003: Florida Marlins 2004: Boston Red Sox 2005: Chicago White Sox 2006: St. Louis Cardinals 2007: Boston Red Sox 2008: Philadelphia Phillies 2009: New York Yankees Oscar-Winning Movies in the 2000s: 2000: Gladiator 2001: A Beautiful Mind 2002: Chicago 2003: The Lord of the Rings: The Return of the King 2004: Million Dollar Baby 2005: Crash 2006: The Departed 2007: No Country for Old Men 2008: Slumdog Millionaire 2009: The Hurt Locker US Presidents in the 2000s: 2000: Bill Clinton 2001-2008: George Bush 2009: Barrack Obama The 1990's (Baseball) The 1990's (The Movies) The 1990's (US Presidents) World Series Champions of the 1990s: 1990: Cincinnati Reds 1991: Minnesota Twins 1992: Toronto Blue Jays 1993: Toronto Blue Jays 1994: No World Series 1995: Atlanta Braves 1996: New York Yankees 1997: Florida Marlins 1998: New York Yankees 1999: New York Yankees Oscar-Winning Movies in the 1990s: 1990: Dances with Wolves 1991: The Silence of the Lambs 1992: Unforgiven 1993: Schindler's List 1996: The English Patient 1997: Titanic 1998: Shakespeare in Love 1999: American Beauty US Presidents in the 1990s: 1990-1992: George Bush 1993-1999: Bill Clinton Sheridan College 4 Rubric Unsatisfactory (0-40%) Satisfactory (40-60%) Good (80%) Excellent (100%) Requirements/ Correct run 50% • Similar solution is found on the internet or submitted by another student • Completed less than 50% of the requirements. • Does not execute due to errors. • No testing has been completed. • Completed most of the requirements. • Executes without errors. • Some testing has been completed, but did not cover all cases. • Completed all the requirements, but solution can be improved • Codes execute without errors • Thorough testing has been completed; all possible test inputs were examined • Executes without errors • Excellent UI (representation of input and output). • Thorough testing has been completed and output from all test cases is included. Solution efficiency 20% • A difficult, non-easily- comprehendible, or inefficient solution. • Prompts/hints/messag es to user are misleading or non- existent. • A logical solution that is easy to follow but it is not the most efficient • Prompts/hints/message s to user contain little information, poor design. • Solution is efficient and easy to follow • Hints, and messages to user are understandable, proper use of symbols or spacing in output • Solution is efficient, easy to understand, and maintain • Excellent prompts/ hints/ messages to user • All aspects of solution were well considered, nothing to improve Coding Standards 10% • Poor use of indentation • Disorganized code • Poor use of variables (global variables, ambiguous naming) • Indentation/White spacing makes program readable. • Organized work. • Good use of variables • Good use of indentation • Organized work. • Good use of variables (no global variables, unambiguous naming) • Excellent use of indentation • Creatively organized work. • Excellent use of variables (no global variables, unambiguous naming). Clarity and documentation 10% • No code documentation included. • No comments on main sections/subsections of code • Basic documentation has been completed • Purpose is noted for each function/method • Clearly documented. • Specific purpose is noted for each function and control structure. • Clearly and effectively documented including descriptions of all variables. • Specific purpose is noted for each section, control structure, I/O code
Answered 8 days AfterOct 04, 2021

Answer To: Sheridan College 1 Faculty of Applied Science & Technology School of Mechanical and Electrical...

Darshan answered on Oct 12 2021
129 Votes
ROJECT NUMBER: 1
1

Section 1:
I have completed assignment as per instruction. I have used if…else statement, for loop iteration,
switch case statement etc. program will execute using below command line.
$ gcc -o test assignment.c
This will create test.exe file.
When you run the program, program will display decades to select from user.
Once User can select any decade program will jump into second sun menu option. Here, program will wait from
user to select option. Users select what they want to get. Program will display selected data to user.
Section 2: Program code.
#include
#include
#include
//Define function
int next_menu( int );
int display_data(int, int );
void fill_data();
char * array[3][3]={"World Series Champions of the 1980s\n" ,"Oscar-Winning Movies in the 1980s:\n", "US
Presidents in the 1980s:\n", "World Series Champions of the 1990s:\n","Oscar-Winning Movies in the
1990s:\n","US Presidents in the 1990s:\n","World Series Champions of the 2000s:\n","Oscar-Winning Movies
in the 2000s:\n","US Presidents in the 2000s:\n"};
//Define structure for data
typedef struct
{
char data[30];
}list;
//Define structure for decade
typedef struct
{
list champions[10];
list movies[10];
list president[10];
}decade;
//Declare structure for each decade
decade _1980;
2

decade _1990;
decade _2000;
int main()
{
unsigned int input;
//fill data as per pdf file
fill_data();
while(1)
{
// Take input from user
printf("#####MAIN MENU#####\n");
printf("Select a option for specific decade:\n");
printf("1. 1980s\n");
printf("2. 1990s\n");
printf("3. 2000s\n");
printf("4. Quit\n");
scanf("%d",&input);
switch(input)
{
case 1:
next_menu(input);
break;
case 2:
next_menu(input);
break;
case 3:
next_menu(input);
break;
case 4:
exit(0);
break;
default:
printf("Wrong input. Please select a proper option for specific decade:\n");
return 0;
3

break;
}
}
return 0;
}
//Function for sun menu option
int next_menu(int option)
{
unsigned int menu;
while(1)
{
//Take user input
printf("#####SUB MENU#####\n");
printf("Select a option:\n");
printf("1. Baseball\n");
printf("2. Movies\n");
printf("3. US presidents\n");
printf("4. Back to main menu\n");
scanf("%d",&menu);
if(menu == 1)
{
display_data(option,menu);
}
else if(menu == 2)
{
display_data(option,menu);
}
else if(menu == 3 )
{
display_data(option,menu);
}
else if(menu == 4 )
{
return 0;
}
4

...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here