CE208-Practical List(VC++)

advertisement
Chandubhai S. Patel Institute of Technology
U. & P.U. Patel Department of Computer Engineering
Subject Name: Object Oriented Programming using Visual C++
Semester
: 4 CE
Subject Code : CE208
Academic year : Jan2011 to April 2011
Practical List
Instructions:
I. Implement the following programs during your lab time.
II. Students have to write the following program in file and then must be hand written with ISO Format.
III. Students have to use Microsoft Visual C++ to perform the following practical.
Sr
No.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Aim
Hrs
Introduction to VC++ editor & Writing console applications
Write a program to print all the prime numbers between 1 to 100 using loop.
Write a program that creates and initializes a ten element integer array. Display its elements.
Calculate average of all elements and Find maximum and minimum.
Write a program to find maximum of two, three and four numbers using method overloading.
Define a Class salesman having members as salesman_id, name & total_sales. Write a VC++
Program to get information about 10 salesmen and display the information.
Define a Class to represent a Bank Account including the following Data Members and Member
Functions:
 Data Members:
Name of the depositor
Account Number
Type of Account
Balance amount in the Account
 Member Functions:
To assign the initial values
To deposit an amount
To withdraw an amount after checking the balance
To display name and balance.
Write a VC++ Program to test the program.
Create two classes circle (radius, area) and rectangle(length, breadth, area). Write a VC++ Program to
create friend function “rest” to calculate area of dark portion.
02
01
01
Write a VC++ program to overload the “+” operator.
Write a VC++ program to implement the inheritance concepts.
Write a VC++ Program to implement the polymorphism concepts.
02
02
02
01
01
02
02
11.
12.
13.
14.
15.
16.
17.
Write a win32 application
a. To create a window at different location using CreateWindow()
b. Write text in client area using DrawText()
c. To draw a line between two clicked points.
Write a simple MFC application
a. Create window of desired size
b. Create of window by registering a class.
Write a MFC program
a. To draw all standard shapes
b. Draw a rectangle in title bar of window (NCPaint) and write Hello World in it.
c. A program to implement Hatchbrush and Patternbrush
d. A program to implement SaveDC and RestoreDC
Write an application
a. To display which key was pressed in messagebox and key event in caption.
b. To note the status of special keys.
Write an application
a. To check whether mouse click was in client area or non-client area
b. To check whether mouse is attached and to find the button of the mouse attached.
c. To draw a line by clicking and dragging the mouse with left button depressed. Also
capture the mouse movement outside the application window.
d. Identify each element of non-client window
Write an application
a. Create menu using resource editor and Load one menu using Create() and another
using LoadMenu()
b. Create a menu using functions of CMenu class
c. Display a messagebox for each menu item selected.
d. Also implement keyboard accelerator for each menu item.
e. To implement check and radio button in menu item
f. Use add, remove and modify menu items along with enable/disable at run time.
Write an application
a. To implement statusbar which display date, time and mouse coordinates, context
sensitive help for menu items & toolbar buttons, status of caps lock, num lock and
scroll lock
b. Implementing two dock able toolbar
c. Write text and animation on toolbar button
d. Display color on toolbar
e. Multi-line toolbar
Create menu to show / hide both toolbar button separately.
02
02
02
02
02
02
02
Download