

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Assignment No. 02 Semester: SPRING 2012 CS410 โ VISUAL PROGRAMMING
Total Marks: 15
Due Date: May 02, 2012
Instructions
assignment is answered and blocked.
It should be clear that your assignment will not get any credit if:
o Assignment is submitted after due date. o Submitted assignment does not open or file is corrupt. o Submitted assignment file is not in required format. o Assignment is copied (From internet/ to from students).
Objective To search and understand some concepts used in Assignment No 1 of Sp2012 semester.
Software (s) Used to develop Assignment MS-Word 2003 / 2007 / 2010
Assignment Submission Instructions ๏ No other format is allowed other than MS-Word supported formats and if it is then straight mark as zero.
Assignment
Question # 01: [Marks: 02] We initialize Owner structure, in Assignment No 1, as below; owner1 = {"Ali Hussain", "Muhammad Hussain", "XYZ, Lahore", "N/A", 12, 12,2012, "4-Wheel", "Honda", "BR-29536", "LEV-0012", 2011, 72000, Vehicle::Van };
Why we are unable to assign a direct value in last attribute of initialization list (enum Vehicle_Class)? (In Bold text). Provide reason in 2 โ 3 lines at max.
Question # 02: [Marks: 03] Write any alternate way to assign a value โVanโ in Vehicle_Class to initialize Owner structure. (Only code is required, no details or text required.)
Question # 03: [Marks: 02] Why we use cin.sync () before cin.getline ()? Describe in 2 -3 lines at max.
Question # 04: [Marks: 03] If we write o2->v.vc = enum_choice; instead of o2->v.vc = (Vehicle::vehicle_class) enum_choice; why this would not work? (For reference, line no 127 of Assignment 1 solution)
Question # 05: [Marks: 05] Write an alternate code instead of using string copy function as written on line 83 of Assignment 1 solution. No marks are given to code which is not in working condition.
Deadline: Your assignment must be uploaded on or before May 02, 2012.