Code Monkey home page Code Monkey logo

oopc-4th-semester's Introduction

oopc-4th-semester

OOPC Practicals for 4th Semester

Object Oriented Programming with C++ practicals for 4th Semester (Jan 2015) of BITS Edu Campus, under the syllabus provided by Gujarat Technological University (GTU).

Practical List OBJECT ORIENTED PROGRAMMING WITH C++ SUBJECT CODE: 2140705 B.E. 4th SEMESTER

  1. Write a C++ program to display “Hello World”.
  2. Write a program to read two numbers through keyboard and display their average on the screen.
  3. Write a program to read 2 numbers through keyboard and perform various arithmetic operations(addition,subtraction etc) .
  4. Write a program to find the largest value among 3 numbers.
  5. Write a program to find the sum and average of first 10 even numbers.
  6. Write a program to read a number n and digit d .Check whether d is present in the number n.If it is so,find out the position of d in the number n.eg: n=75689,d=5 i.e. 5 is present at the position 2
  7. Write C++ program to read a positive integer n and generate numbers in the following form: Eg:n=5 then o/p :5 4 3 2 1 0 1 2 3 4 5
  8. Write a program to generate Fibonacci series of n numbers.
  9. Write a program to find the sum of following series using functions: Sum=x-(x^3)/3! + (x^5)/5!-….(x^n)/n!
  10. Write a program to exchange the content of 2 variables using: Call by value and call by reference.
  11. Write a program to find the square of a number belonging to 3 datatypes namely int,float and double using function overloading.
  12. Write a program to find the area and perimeter of circle,square and rectangle by using 1)Function overloading 2) Inline function. Write a program using inline function to find the largest of 3 numbers.
  13. Write a program to show book information(name,author,price) by using classes and methods.
  14. Write a program to perform different arithmetic operations using class and member functions.
  15. Write a program to find a largest number by using nesting of member function.
  16. Write a program to count the number of objects of class by using1)Static member variable 2)Static member function.
  17. Create a class account.It has 3 data members accound id,name and balance.Define function to assign value and display value.Define function that search account no given by the user.If account no exists,print detail of that account.Write a program using array of object.Declare atleast 3 account and print details.
  18. Write a program to find minimum from 2 nos using friend function.
  19. Define a class matrix with an integer array of 3x3 as a data member.Define a friend function which adds 2 matrix objects and returns resultant matrix object.
  20. Write a program to add complex number using constructor overloading.
  21. Write a program to demonstrate destructor.
  22. Write a program to define how the unary minus operator is overloaded.
  23. Write a program to add 2 complex nos using operator overloading.
  24. Write a menu driven program that performs following functions on strings using operator overloading:Concatenate two strings(+ operator),Check whether first string is smaller than the second(<= operator)
  25. Write a program to read the data members such as rollno,name,gender,height,weight and provide member functions getdata() and display().It consists of 2 classes basicinfo and physical fitness class.Use inheritance.
  26. Create 3 classes basicinfo,academic info,physical fitness.Read name,rollno,gender,height,weight,course,semester,rank through keyboard.Provide getdata and display member functions.Use inheritance.
  27. Create a class student that sytores rollno,name.Create a class test that stores marks obtained in 5 subjects.Class result is derived from student and test contains the total marks and percentage obtained in test.Input and display information of a student.
  28. Class employee(name,code,pay,experience) derives information from both account(pay) and admin (experience)classes which in turn derive information from the class person.define all the four classes and write a program to create and display the information contained in employeeobjects.
  29. Assume that the test result of a batch of students is stored in 3 different classes.Class student stores the rollno,Class test stores the marks obtained in 2 subjects and class result contains the total marks obtained in the test.Use multilevel inheritance.
  30. Write a program to demonstrate this pointer.
  31. Write a program to demonstrate virtual functions through inheritance.
  32. Write a program to read a text file and display the contents on the screen.
  33. Write a program to copy the contents of a text file into another.
  34. Write a program to convert a lowercase character of a text file to uppercase characters and store it in another file.
  35. Write a program to define a function template for summing an array of integers and an array of floating point numbers.
  36. Write a program to define a function template for swapping 2 nos. of integers and floating point .
  37. Write a program to perform Bubble sort using template function.
  38. Write a program to show how to define and declare a class template for reading 2 items(int,float) from the keyboard and to find the sum of the given 2 items.

Format of file: All programs are hand-written. It should contain program definition, relevant theory (if applicable), code, and output.

oopc-4th-semester's People

Contributors

umanghome avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.