Posts

Radioactivity Assignment complete with experiment

  Radioactivity Background: Henri Becquerel was a french scientist who discovered radioactivity in 1896, it was an accidental discovery. Henri at that time studied luminous material, luminous material is of two types one Fluorescent and the other is phosphor- descent . Henri was so much inspired with the recent discovery of x-rays. After   this discovery Henri found proof of radioactivity, while inves- tigating how uranium is influenced by light, He found that urani- um produce rays that can penetrate many material, and blacken the photographic plate even in the darkness. For invesigate further there was another two scientist named as Pierre curie and his partner Marie curie, they both investigating many material to find science of radioactivity. From uranium these both scientist able to sucessfully extract two others radioactive elements name as radium and the other one is polonium. And after these discovie...

Clothing Store Management system Source Code in c++

Program description:   This system is designed with the purpose for adding dress items in detail.by using this staff can sign up as a system admin and they can have access to the system for the maintenance of daily records.Language used in this system is c++. and in order to run this program using Dev c++.   code:     #include <fstream> #include <iostream> #include <conio.h> #include <string> #include <stdio.h> using namespace std; class dress{     private:       char filename[20];     protected:       char dressname[60];       char dressid[10];       float price;       void get(); }; void dress::get()       {     cout<<"\n ENTER DRESS NAME : "; ...

Chapter:9 Inheritance, solved Exercise question book by Robert Lafore

Image
  OOP BY ROBERT LOFORE 4th Edition Chapter:9 Inheritance Question no 5  :   Derive a class called employee2 from the employee class in the EMPLOY program in this chapter. This new class should add a type double data item called compensation, and also an enum type called period to indicate whether the employee is paid hourly, weekly, or monthly. For simplicity you can change the manager, scientist, and laborer classes so they are derived from employee2 instead of employee. However, note that in many circumstances it might be more in the spirit of OOP to create a separate base class called compensation and three new classes manager2, scientist2, and laborer2, and use multiple inheritance to derive these three classes from the original manager, scientist, and laborer classes and from compensation. This way none of the original classes needs to be modified. Program source code: #include <iostream> #include <conio.h> using namespace std; const int LEN = 80...

Chapter:9 Inheritance, solved Exercise question book by Robert Lafore

Image
  OOP BY ROBERT LOFORE 4th Edition Chapter:9 Inheritance Question no 4: Assume that the publisher in Exercises 1 and 3 decides to add a third way to distribute books: on computer disk, for those who like to do their reading on their laptop. Add a disk class that, like book and tape, is derived from publication. The disk class should incorporate the same member functions as the other classes. The data item unique to this class is the disk type: either CD or DVD. You can use an enum type to store this item. The user could select the appropriate type by typing c or d .   Program source code: #include <iostream> #include <string> #include <conio.h> using namespace std; class publication { private:  string title;  float price; public:  void getdata(void)  {   string t;   float p;   cout << "Enter title of publication: ";   cin >> t;   cout << "Enter price of publication: ";   cin >> p;...

Chapter:9 Inheritance, solved Exercise question book by Robert Lafore

Image
  OOP BY ROBERT LOFORE 4th Edition Chapter:9 Inheritance Question no 3  : Start with the publication, book, and tape classes of Exercise 1. Add a base class sales that holds an array of three floats so that it can record the dollar sales of a particular publication for the last three months. Include a getdata() function to get three sales amounts from the user, and a putdata() function to display the sales figures. Alter the book and tape classes so they are derived from both publication and sales. An object of class book or tape should input and output sales data along with its other data. Write a main() function to create a book object and a tape object and exercise their input/output capabilities.  Program Source code: # include <iostream> #include <string> #include <conio.h> using namespace std; class publication { private: string title; float price; public: void getdata(void) { string t; float p; cout << "Enter title of publication: "; cin...

Chapter:9 Inheritance, solved Exercise question book by Robert Lafore

Image
  OOP BY ROBERT LOFORE 4th Edition Chapter:9 Inheritance Question no 2;   Recall the STRCONV example from Chapter 8. The String class in this example has a flaw: It does not protect itself if its objects are initialized to have too many characters. (The SZ constant has the value 80.) For example, the definition String s = “This string will surely exceed the width of the “ “screen, which is what the SZ constant represents.”; will cause the str array in s to overflow, with unpredictable consequences, such as crashing the system. With String as a base class, derive a class Pstring (for “protected string”) that prevents buffer overflow when too long a string constant is used in a definition. A new constructor in the derived class should copy only SZ–1 characters into str if the string constant is longer, but copy the entire constant if it’s shorter. Write a main() program to test different lengths of strings.  Program Source code: #include <iostream> #include <con...