1codearea.in/wp-content/uploads/2012/08/sybca_sem_iv... · web viewcreate a c++ class telephone...

47
UNIVERSITY OF PUNE SYBCA (Sem-IV) Practical Examination Lab Course (C++, Visual Basic) [Duration – 3 hrs] [Maximum Marks: 100] 1. Write a VB program to find the prime numbers between 1 to100 and display it onto the form. [15 Marks] 2. Create the following application in VB. The form should contain the following menu Draw Modify Exit Circle Shrink Expand Erase On selection of the menu option ‘Circle’, a circle should be drawn on the screen. The user can Shrink, Expand or Erase the circle by selecting the menu option or by displaying a popup menu after the right mouse button is clicked or pressed. The popup menu should contain the option Shrink, Expand or Erase which should perform the same operation as the menu option. [25 Marks] 3. Write a C++ program using class with data member’s int feet, float inches to represent distance and define function that takes distance as argument and returns the larger one. Include a main program that accepts two distance figures from the user compare them and displays the larger using Inline function. [15 Marks] 4. Write a necessary C++ class & member function definition for a cricket player object. (Use array of objects) The program should accept the details from user (max 10): Player code, name, runs, innings- played and number of times not out. The program should contain following menu: - Enter details of players. - Display average runs of a single player. 1

Upload: nguyencong

Post on 03-Apr-2018

332 views

Category:

Documents


14 download

TRANSCRIPT

Page 1: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to find the prime numbers between 1 to100 and display it onto the form. [15 Marks]

2. Create the following application in VB. The form should contain the following menuDraw Modify ExitCircle Shrink

ExpandErase

On selection of the menu option ‘Circle’, a circle should be drawn on the screen. The user can Shrink, Expand or Erase the circle by selecting the menu option or by displaying a popup menu after the right mouse button is clicked or pressed. The popup menu should contain the option Shrink, Expand or Erase which should perform the same operation as the menu option. [25 Marks]

3. Write a C++ program using class with data member’s int feet, float inches to represent distance and define function that takes distance as argument and returns the larger one. Include a main program that accepts two distance figures from the user compare them and displays the larger using Inline function. [15 Marks]

4. Write a necessary C++ class & member function definition for a cricket player object.(Use array of objects)The program should accept the details from user (max 10): Player code, name, runs, innings- played and number of times not out. The program should contain following menu:

- Enter details of players. - Display average runs of a single player. - Display average runs of all players.

(Use function overloading) [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

1

Page 2: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to find Armstrong numbers between 1 to 1000 and display it onto the form using function. [15 Marks]

2. Write a VB program for traffic signal, if we click on Start command button then it should start the signal by changing background color of textbox, after 30 seconds background color of textbox should automatically get change. If we click on Stop button then signal should yellow and blink it.

[25 Marks]

3. Consider the C++ class Class mystring { char str [30]; int length; Public:

// member function }; Overload the function called “check” for the class to perform the following operations.

i) Check if a specific character is present in str. Returns position if found, -1 if not.

ii) Compares the length of two mystring objects and returns 1 if they are equal, 0 if not. [15 Marks]

4. Write a necessary C++ class to calculate variance & standard deviation of n numbers.

Variance = 1/N ∑ (Xi-A.M.)2 for all i = 1 to N

S.D. = √variance

Where A.M. (Arithmetic Mean) = 1/N ∑ Xi for all i = 1 to N

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

2

Page 3: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to find sum of digits of a given number till it reduces to single digit. Display the output using MsgBox (using function). [15 Marks]

2. Design a data entry screen for the following:A customer of a Video Library can be of two types. He can be a member or a customer paying online charges. A videocassette can be latest, new or old. The charges in Rupees per day are:

Member Non-MemberLatest 30 40New 20 30Old 15 20The library also allows home delivery for which member have to pay Rs. 10 and non-member have to pay Rs.20. The data entry screen should access all details including data of borrowing and data of returning and should display the amount to be paid. (Use appropriate controls)

[25 Marks] 3. Create a C++ class Date which contains:

- day- month - year

Overload operators >> and << to accept and display date object. [15 Marks]

4. Create a class phone having data members:1. The STD code2. The Exchange code3. Phone NumberEx :- 212-766-8901

Write a C++ program to accept details from user (max 10) and change input phone number to new phone number using following criteria:

a) Add 1 to 1st digit of STD code. (If digit is 9 it becomes 10)b) The exchange code is retained as it is.c) In 3rd part of structure, 1st two digits should be reversed.

Ex: I/P : 212-766-890 => O/P : 312-766-980Display all changed phone numbers. [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

3

Page 4: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to find sum of first and last digits of a given number. Display the output using msgbox. [15 Marks]

2. Write a VB Program to accept the details of employee from user & store that details in to the database. (Don’t use Standard controls) Employee having fields empcode, empname, salary, dateofjoining. [25 Marks]

3. Write a C++ program using class to calculate square and cube of given number using Inline function. [15 Marks]

4. Create a C++ class telephone containing name, telephone number & city as data members and write necessary member functions for the following:

- Search the telephone number with given name. - Search the name with given telephone number.- Search all customers in a given city.

(Use function overloading) [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

4

Page 5: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write VB program to place three text boxes onto the form at run time. Enter different strings in first and second textbox. On clicking to command button, concatenation of two strings should be displayed in third text box. [15 Marks]

2. Design a form in VB with two Listboxes. Set the style property of both to 0 and 2 (Multiselect) respectively.

One with the left arrow and the one with the right arrow. On pressing the left arrow the selected item from List Box 1 should be transferred to List Box 2 (only if it does not exist in List Box 2). If the right arrow is pressed, the selected item (multiple selection are not in ListBox1 should be) transferred to List box 1.

Add items and remove items buttons for each list. Duplicate item should not be added. [25 Marks]

3. Write a C++ program using class to calculate simple interest amount use default value for rate. [15 Marks]

4. Create a base class Student(Roll No, Name) which derives two classes Test (Mark1, Mark2) and Sport(Score). Result(total marks, grade) class inherits both Test and Sport classes. Write a C++ menu driven program to perform the following functions:

- Build a master table- Calculate total of marks and grade- Display the details of all students in ascending order of marks.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

5

Page 6: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to display the reverse of a given number using function. [15 Marks]

2. Write a VB program to accept the details of students and display mark sheet details on grid control.( rollno, student name, class, sub1, sub2, sub3, total, percentage, grade) [25 Marks]

3. Write a C++ program using class to check maximum of two integer numbers using Inline function and conditional operator. [15 Marks]

4. Define a C++ class to represent a bank account which includes following members :Data members –

1) Name2) Account number 3) Type of account 4) Balance

Member functions –a. To assign initial valueb. To deposit an account c. To withdraw an account d. To display name, account number & balance.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

6

Page 7: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to display Fibonacci series up to given term (use InputBox).[15 Marks]

2. Write a VB program to accept the details of student from user & store the details in the database without using standard controls (Use reference of ADODC). Student having fields roll number, name, class name, date of birth. [25 Marks]

3. Consider a class point containing x and y coordinates. Write necessary functions for the following cases:

1. to accept a point 2. to display it 3. to find distance between two points using operator overloading (-)

(Use friend function) [15 Marks]

4. An electricity board charges the following rates to users - For first 100 units : 40p per unit- For next 200 units : 50p per unit - Beyond 300 units : 60p per unit

All users are charged a minimum of Rs.150. If the total cost is more than Rs.250.00 then an additional charges of 15% are added.

Write a C++ program using class to read the name of users & number of units consumed & print out the charges with names.(Use Array of Objects) [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

7

Page 8: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to take one list box, it contains name of picture file. If you click on particular picture file name then corresponding picture should be display onto the picture box.

[15 Marks]

2. Write a VB program to create a Stop Watch. It contains buttons Start, Stop, Pause, and Reset. It should display time in hours, minute, second, millisecond. [25 Marks]

3. Create a C++ class Integer that contains one integer data member. Overload following binary operators (+,-,*, /).

[15 Marks]

4. Create a C++ class for inventory of books containing author, title, price, and publisher and stock as data members. Book can be sold, if stock is available, otherwise purchase will be made. Write necessary member functions for the following:

1. To accept details from user.2. To sale a book. (Sale contains book details & number of copies to be sold.)3. To Purchase a book. (Purchase contains book details & number of copies to be

purchased)(Use new operator to allocate memory). [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

8

Page 9: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB Program to find Multiplication of two matrices. [15 Marks]

2. Design an application in VB which has a Drivelistbox, Dirlistbox, Filelistbox control. The form contains the following command buttons:

i) All drives : Display all drives in computer (including network drives)ii) All subdirectories: Display all subfolders of the currently selected directory.iii) All files : Display a popup menu which contains the following options:

a. All document files b All bitmaps

c All filesOn selection of option, display the specified type. [25 Marks]

3. Consider the following C++ class Class mystring { char str [30];

int len; Public:

// member functions }; overload operator “= =” to compare two strings. [15 Marks]

4. Imagine a tollbooth at a bridge. A Car passing by the booth is expected to pay a toll. The tollbooth keeps the track of the number of cars that gone by and the total amount of cash collected.Create a C++ class tollbooth with the data members as:-

-total number of cars passed. -total toll collected.

Write necessary member functions: 1. a constructor that initializes both data members to zero.

2. paying car(): when any car passes through the tollbooth, that much toll gets added into total toll collected and total number of cars passed is incremented by one. 3. nonpaying car(): increments the car total but adds nothing to cash total.4. display (): displays total no. of cars passed and the total amount collected.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

9

Page 10: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to create standard toolbar on to the form.(Toolbar contains at least five buttons.) [15 Marks]

2. Write a VB Program to accept the details of employees from user & store details in to the database. Display those details onto the screen by using report. (Use Standard ADODC controls.) Employee details contain empcode, empname, salary, address.

[25 Marks]

3. Consider following C++ class Class Numbers { int x;

int y;int z;public:

// member functions }; Overload the operator unary minus- to negate the numbers. [15 Marks]

4. Create a C++ class time that contains hours, minute and seconds as data members. Write the member functions:

1. to add two object of type time, passed as arguments .2. to convert a time into total number of seconds.3. to display the time into format like: 10:10:10.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

10

Page 11: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to accept a number from user and calculate sum of even digits of a given number. [15 Marks]

2. Write a VB program to accept the details of customer having fields cno, cname, address, phone number. Display those details on to the screen using data report.(Don’t use standard controls). [25 Marks]

3. Consider the following C++ class Class mystring { char str [30];

int len; Public:

// member functions };

Overload operator + to concatenate two strings such as string1+string2=string3. [15 Marks]

4. Create a C++ class student containing data members: - Rollno

- name -marks1, marks2, marks3

Write necessary member functions: 1. to accept details of all students

2. to display details of one student 3. to display details of all students

(Use Function overloading). [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

11

Page 12: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Design an application that contains one label button, two combo boxes, one box contains any text and second box contain color names. Write a VB program to set caption and background color to the label control from respective combo boxes.

[15 Marks]

2. Write a VB program to accept the details of doctor having fields dno, dname, address, phone number. Display those details on to the grid. [25 Marks]

3. Create a C++ class Float that contains one float data member. Overload the unary increment ++ operator. [15 Marks]

4. Create a C++ class FDAccount containing members as:- Fdno- Name- Amt- Interest rate- Maturity amt - Number of months

Use parameterized constructor to set appropriate details, where interest rate should be default argument. Calculate maturity amt using interest rate and display all the details.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

12

Page 13: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to set picture to the command button at run time, if we click on button then it should display picture on that button, if we disable that button then another picture should display on that button. [15 Marks]

2. Write a VB program to accept the details of product having fields pno, pname, qty, price totalprice and store it into the database and update the quantity of product having pno is 100. (Don’t use Standard Data controls) [25Marks]

3. Create a C++ class Float that contains one float data member. Overload the unary decrement -- operator. [15 Marks]

4. Create a C++ class for student having following members.- Rollno- Name- Number of subjects- Marks of each subject

(Number of subjects varies for each student) Write a parameterized constructor which initializes rollno, name & Number of subjects and creates the array of marks dynamically. Display the details of all students with percentage and class obtained. [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

13

Page 14: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to display age in year, month, days, hours, minutes, seconds. [15 Marks]

2. Write a VB program to add three text boxes at runtime. Allow user to enter values and then display average of values after click on command button. [25 Marks]

3. Consider the following C++ class Class Person { char Name [20];

char Addr [30];float Salary;

int Property; //in sq. foot areafloat tax_amount;

Public: // member functions

};

Calculate tax amount by checking salary and the property of the person For salary <5000 tax rate=0 For salary >=5000||<=10000 tax rate= 14% of salary. For salary >=10000 tax rate =16% of salary.

In this tax amount add following amt depending on the size of area in sq.foot For 1000 sq. foot area amt=0. For >1000|| < 5000 sq. foot area amt= 1000 For >5000||<= 10000 sq. foot area amt=3000.

[15 Marks]

4. Define a C++ class for a 3 dimensional points. Write necessary member functions for accepting & displaying the point object. Overload the following operators:

Operator Example Purpose + (Binary) p3=p1+p2 adds coordinates of point p1 to p2.

- (Unary) -p1 Negates coordinates of point p1. [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

14

Page 15: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to find the roots of quadratic equation. [15 Marks]

2. Write a VB program to search an employee record from the database according to the empcode and display that record onto the form. (Use combo box). [25 Marks]

3. Write a C++ program to define function power to raise a number m to a power n the function takes a double value for m. and integer value for n and return the result correctly use a default value of 2 for n, to calculate squares when this argument is omitted.

[15 Marks]

4. Create a C++ class Array which contains - int *ptr- int n

Write a menu driven program :- to Accept an array from user- to display it.- to add two arrays using operator overloading.- to subtract two arrays using operator overloading.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

15

Page 16: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a program in VB to display the status of mouse using label controls program should display current x, y positions of mouse. When user clicks left or right buttons label should indicate which button is pressed. Program should also indicates double click .When user clicks on close, show summery report as given below

[15 Marks]

2. Write VB program for dragging and dropping multiple objects. (take two command buttons RESET and EXIT, and four image controls). When user click on reset button then all images will go to original position. [25 Marks]

3. Write a menu driven C++ program using class to perform all arithmetic operation (+,-,*,/) (use inline function). [15 Marks]

4. Create a C++ class vector that contains series of n numbers. Perform the Pre-Increment and Post- Decrement operations on a vector object using operator overloading.(Use friend Function). [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

16

Page 17: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to display all even and odd numbers from an array. [15 Marks]

2. Design a data entry screen in VB for the following case: A company wants to find out the response of people to their new product which was Introduce in the market.

a) Accept the name of the customer.b) Provide choice as Excellent, Satisfactory, Average, Bad.c) Should provide Continue & Quit button. When user click on Continue the previous

data should be erased and new data should be accepted. The Quit button should display a report showing the total number of customers who entered their opinion and the percentage of customer who feels that the product is Excellent, Satisfactory, Average Or Bad.

NOTE: The user can choose only opinions provided. [25 Marks]

3. Write a C++ program using class with data member char str[50] and function replace (char c1, char c2) every occurrence of c1 in str should be replaced with c2 and return number of replacement it makes use default value for char c2. [15 Marks]

4. Create a class Time which contains:- hours- minutes- second

Write a C++ program using operator overloading for the following: 1. = = to check whether two Times are same or not.2. >> to accept the time.3. << to display the time.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

17

Page 18: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to check whether given number is perfect or not by using ‘msgbox’. [15 Marks]

2. Write a program in VB that prepares a menu for reservation and cancellation of ticket for theater. The program should ask the number of ticket that user wants to book and the category as balcony, upper, lower (comes through a list box) the program then displays the number of ticket booked, the category and the total amount that the user has to pay. Appropriate Continue and Exit buttons should also be included. [25 Marks]

3. Write a C++ program to find volume of cube, cylinder and rectangle using function overloading. [15 Marks]

4. Create a class string which contains a character pointer. Write a C++ program to overload following operators:

1. < to compare two strings2. != to check equality of two Strings.

(Use new operator to allocate memory) [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

18

Page 19: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write program in VB to find factorial of a number using ‘msgbox’. [15 Marks]

2. Write a VB program, i.e. menu driven that facilitates following task in a hotel1. Reserves a room for a date 2. Cancel the reservation 3. Checkout, print bill on the checkout4. List of all booked rooms.

Assume that the hotel contains 5 rooms [25 Marks]

3. Design a C++ class which contain static data member and member function show() which displays number of times display operation is performed irrespective of the object responsible for display using static data member. [15 Marks]

4. Create a class Distance containing Feet and Inches as data members. Write a C++ program to read distance from user, store it in the file and to read it from the file and display it to the user.

Use operator overloading for the following:1. << to write distance object in inches format to a file2. >> to read inches from File.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

19

Page 20: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to convert a temperature from Celsius to Fahrenheit and vice versa. [15 Marks]

2. Write a VB program that takes a set of ten numbers and converts them into either a bar chart or pie chart using appropriate button. For a bar chart you must scale your values to make the best use of available space. Before drawing the bars, find the largest number in the cell.(Use this largest number and height of display area to workout suitable scale factor.)

[25 Marks]

3. Write a menu driven C++ program using class to calculate Area and Volume of rectangle using inline function. [15 Marks]

4. Create a C++ class MyFile containing: fstream fp; Char *fn;

Write necessary member Functions using operator overloading: 1. + F3=F1+F2 Put contents of F1 and F2 in F3. 2. - -F3 Changes the case of all upper and lower case characters in F3.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

20

Page 21: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a menu driven program in VB for i. Additionii. Subtractioniii. Multiplicationiv. Division

[15 Marks]2. Write VB program to design following form

User will select color from option button and style from check boxes, that should apply to text in text boxes. When user press on Display button, that image should be displayed in the picture box.

[25 Marks] 3. Consider the following C++ class Class mystring { char str [30];

int len; Public:

// member functions }; Overload operator “!” to reverse the case of each alphabet in the string.

[15 Marks]4. Create a C++ class currency containing rupees and paise as data members. Write necessary member functions using operator overloading for the following:

1. currency (long int rup=0,int paise=0)2. currency & operator += (currency &) (to add one currency to another)3. currency & operator - = (currency &) (to subtract one currency from another)

Accept Rupee & paise from user and display it. [25 Marks]

5. Journal [10 Marks]

21

Page 22: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

6. Viva [10 Marks]

1. Write a VB program to check whether the given Armstrong number is present in array or not. [15 Marks]

2. Write a VB program to store the details of players into the database and display that details using ADODC. (Don’t use Standard Control) [25 Marks]

3. Consider a C++ class Class matrix{

int **p;int r,c;

Public: //member functions

}Write a necessary member functions to accept & display matrix element. Use constructor to construct two dimensional arrays using new operator. [15 Marks]

4. Define a C++ class for 3 dimensional points, Write necessary member functions for accepting and displaying the point object. Overload the following operators:

Operator Example Purpose * (Binary) p3=p1*p2 multiplies coordinates of point p1 with p2.

- (Binary) p3=p2-p1 subtracts coordinates of p1 from p2. [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

22

Page 23: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to accept the number from the user in text box and display multiplication table of that number into the list box. [15 marks]

2. Design an application in VB to implement the find and replace dialogue box for textbox control with the multiple line of text with 3 options buttons for changing font and three checkboxes for giving effect (Bold, Italic, Underline) to the text. The form should contain following command buttons

a. Findb. Find Next c. Replace

d. Replace all [25 Marks]

3. Write a C++ program to find area of triangle, circle, and rectangle using function overloading. [15 Marks]

4. Write a C++ program to read the contents from the file “sample.txt”. Store all the characters from “sample.txt” into the file “character.txt” & store all digits into the file “digit.txt “.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

23

Page 24: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to create screen sever on the form. [15 Marks]

2. Write a VB program to accept the details of book, store those details into the database and delete the particular record of given book id. (Use InputBox)

[25 Marks]

3. Write a C++ program to sort integer array and float array element in ascending order using bubble sort method use function overloading. [15 Marks]

4. Create a C++ class Student having data members: - RollNo - Name - Marks

Write necessary member functions :1. to accept the details and store it into the file “school.dat”2. to read the details from file and display it.3. to update a given record into the file.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

24

Page 25: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to accept input from the user in text box and add that text into the list box by using command button. [15 Marks] 2. Write a program in VB for currency conversion. The program should input the amount in any currency and the output should be displayed in the desire currency as selected by the user. An input form should accept all the currency rates. The various currencies are rupee, dollar, pound, euro, ruble and yen.

[25 Marks]

3. Write a C++ program which will find the maximum of 3 integer numbers and maximum of 3 float numbers using function overloading. [15 Marks]

4. Create a C++ class Medicalshopee containing - medicine_no- medicine_name- qty- price

Medicine details are stored into the file “medical.txt” .When any medicine has to be sold, it is first searched into the file, if found, the qty is decremented by that much qty to be sold.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

25

Page 26: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to create menus of MS-Word and display it onto the form. [15 Marks]

2. Create an application in VB to display 4 X 4 squares on the screen. One of the block will be active with black color all other block will be fill with blue color. Provide a command button as follows to move the active cell the active cell should be change only if it is within the boundary. [25 Marks]

3. Consider a C++ class Complex Class Complex {

float real;float imaginary;

Public://member functions;

};Overload operator ‘+’ to add two objects of class complex use parameterized constructor for accepting values of complex numbers.

[15 Marks]

4. Design two base classes Personnel (name, address, email-id, birth date) and Academic (marks in tenth, marks in twelth, class obtained). Derive a class Bio-data from both these classes. Write a C++ program to prepare a bio-data of a student having Personnel and Academic information. [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

26

Page 27: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to display addition of two matrix. [15 Marks]

2. Write a menu driven program in VB for reservation & cancellation of tickets for a theatre. The menu should also contain an option for displaying the reservation details. The program should ask for the no. of tickets that the user wants to book and category (balcony, upper & lower) (Use a List Box ).Display no. of tickets booked, Category & total amount. The reservation details should display no. of tickets booked at any instant of time category-wise.

[25 Marks]

3. Consider a C++ class Class Matrix{

int a[3][3];Public:

//member functions;};

Write a necessary member function to accept & display matrix. Let m1 and m2 are two matrices. Find out m3=m1+m2 (use operator overloading). [15 Marks]

4. Write class declarations and member function definitions for a C++ base class to represent an Employee (emp-code, name).Derive two classes as Fulltime (daily rate, number of days, salary) and Parttime (number of working hours, hourly rate, salary).Write a menu driven program to:

1. Accept the details of ‘n’ employees and calculate the salary.2. Display the details of ‘n’ employees.3. Search a given Employee.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

27

Page 28: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to create status bar and display it on onto the form. (Status bar should have five panels to display any text, date, time, CPAS ON/OFF, NUM ON/OFF. [15 Marks]

2. Write a VB program to accept the details of game and store that details into the databaseand display it. Apply various operation on the record- move next, previous, first and last. (Use reference of data control) [25 Marks]

3. Consider a C++ classClass Matrix{

int a[3][3];Public:

//member functions;};

Write a necessary member function to accept & display matrix. Overload the – (Unary) operator to negate the numbers stored in the object. [15 Marks]

4. In a bank, different customers having saving account. Some customers may have taken a loan from the bank. So bank always maintains information about bank depositors and borrowers. Design a Base class Customer (name, phone-number).Derive a class Depositor(accno, balance) from Customer. Again derive a class Borrower (loan-no, loan-amt) from Depositor. Write necessary member functions to read and display the details of ‘n’ customers. [25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

28

Page 29: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB Program to find transpose of a matrix. [15 Marks]

2. Create a book database consisting of a single table called booking for storing book information namely book name, author, and price.

Write a menu driven program with following options for operations on the database File Record Modify

Exit Previous Add NewNext Delete Current FirstLast

If there are no records in table, disable the Delete current option. Allow a maximum of 10 records. If there are 10 records, disable the Add New option. [25 Marks]

3. Consider a C++ class Class Matrix{

int a[3][3];Public:

//member functions.};

Write a necessary member function to accept & display matrix. Let m1 and m2 are two matrices. Find out m3=m1*m2(use operator overloading). [15 Marks]

4. Create a base class Roundshape(radius). Derive three different shapes as Circle, Sphere and cylinder(height) from Roundshape.

Class Roundshape{

Protected : float radius;Public: static float Pi;

Roundshape(float); //default argumentvirtual float area( )=0;

};Write a C++ program to calculate area of Circle, Sphere and cylinder.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

29

Page 30: 1codearea.in/wp-content/uploads/2012/08/SYBCA_Sem_IV... · Web viewCreate a C++ class telephone containing name, telephone number & city as data members and write necessary member

UNIVERSITY OF PUNESYBCA (Sem-IV) Practical Examination

Lab Course (C++, Visual Basic)[Duration – 3 hrs] [Maximum Marks: 100]

1. Write a VB program to find whether given matrix is symmetric or not. [15 Marks]

2. Design an form in VB to accept details about a telephone user (user code, user address, telephone number, number of calls) The form should contain 3 command buttons

Bill (Which prints a bill based on the following information) Continue (which clears current data and allow new data entry) Close (which exits the application)

Category: Urban Area (the first 150 calls are free and rent is Rs. 500)No. of calls Charge (per Call)

>150 and <=500 Rs. 1.00>500 Rs. 1.20

Rural Area (The first 250 calls are free and rent is Rs. 350)No. of calls Charge (per Call)

>250 and <=500 Rs. 0.80>500 Rs. 1.00(Using Database)

[25 Marks]3. Consider the following C++ class

Class String{

char *ptr;int length ;

public://member functions.

};Overload the unary operator! to check whether a string is empty or not. Write other

necessary functions, constructor and destructor. [15 Marks]

4. Consider the following C++ class hierarchy.Create a base class Employee(empcode, empname). Derive the classes

Manager(designation, clubdues), Scientist(deptname, publications) and Labourer fromEmployee class. Write a C++ menu driven program

1. to accept the details of ‘n’ employees2. to display the information3. to display all the scientist from “Chemistry Department”.

[25 Marks]

5. Journal [10 Marks]

6. Viva [10 Marks]

30