Docsity

Vehicle and Owner Structure-Object Oriented Programming-Assignment, Exercises of Object Oriented Programming

Toggle sidebar
bg1
Assignment No. 01
Semester: SPRING 2012
CS410 – VISUAL PROGRAMMING
Total Marks: 30
Due Date:
16 / 04 / 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 understand and revise basics of C / C++ Language.
Software (s) Used to develop Assignment
Dev C++
Assignment Submission Instructions
Assignment should be submitted in “VU-RollNo.cpp” format.
e.g. MC123456789.cpp
You are not allowed to change given Variables Names, Types and Function Names.
Assignment
We are going to write a program of Vehicle Registration System. Follow the instructions / problem set below
for assignment;
1 – There are two (2) structures in a program named as Vehicle and Owner.
2 – Variables in Vehicle structure are;
Structure of Vehicle
Attribute Name Data Type Example
vehicle-type char 2 wheel, 3 Wheel, 4 wheel etc.
maker char Honda, Toyota, Suzuki etc.
year-of-manufacture int 2012 etc
engine-no char BR-29536 etc.
registration-no char LEV-0012 etc.
vehicle-price unsigned int 48000 etc.
docsity.com
pf3
pf4

Partial preview of the text

Download Vehicle and Owner Structure-Object Oriented Programming-Assignment and more Exercises Object Oriented Programming in PDF only on Docsity!

Assignment No. 01 Semester: SPRING 2012 CS410 – VISUAL PROGRAMMING

Total Marks: 30

Due Date: 16 / 04 / 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 understand and revise basics of C / C++ Language.

Software (s) Used to develop Assignment Dev C++

Assignment Submission InstructionsAssignment should be submitted in “VU-RollNo.cpp” format. e.g. MC123456789.cppYou are not allowed to change given Variables Names, Types and Function Names.

Assignment

We are going to write a program of Vehicle Registration System. Follow the instructions / problem set below for assignment; 1 – There are two (2) structures in a program named as Vehicle and Owner.

2 – Variables in Vehicle structure are;

Structure of Vehicle

Attribute Name Data Type Example vehicle-type char 2 wheel, 3 Wheel, 4 wheel etc. maker char Honda, Toyota, Suzuki etc. year-of-manufacture int 2012 etc engine-no char BR-29536 etc. registration-no char LEV-0012 etc. vehicle-price unsigned int 48000 etc.

3 – Variables in Owner structure are;

Structure of Owner

Attribute Name Data Type owner-name char father-name char address char date-of-purchase int month-of-purchase int year-of-purchase int transferred-from char

4 – Make enumerator named as vehicle-class which has the value set given below. No vehicle is beyond these values.  Motor Cycle  Car  Van  Sports Car  Pickup  Truck

5 – vehicle-class enumerator should be in structure Vehicle.

6 – Instance / variable / object of Vehicle structure is passed in Owner structure.

7 – Initialize the variables in structures. (You may initialize them in structure / main function).

8 – When your program starts, the following lines are appeared on screen.

9 – There are three functions named as:  ViewTransferRegister

Function Transfer :

  • Sample Display Screen is provided below;
  • You have to swap Owner Name and Transferred from then take input from user for the fields as in figure above.
  • After that Clear the Screen and call View function to view all information in the structure as shown in Function View description in addition of displaying Transferred from name at the end.

Function Register :

  • You have to take input of all variables in structure except Transferred from. (Registration is used for newly buy vehicle)
  • Sample Display Screen is provided below;

Deadline: Your assignment must be uploaded on or before 16 / 04 / 2012.