The document describes a stock market application created using CORBA. It defines stock interfaces and data types in an IDL file. It implements the server using a POA and registers it with the naming service. The client connects to the server object, allows registration of companies and customers, and has options to buy/sell shares or view details. The code provides an example of building a distributed stock trading application using CORBA.
Have you ever wanted to add a new feature to your code but instead found yourself spending hours trying to understand the existing code? Or adding a new feature and then finding out you've broken something else, supposedly unrelated, that used to work?
These slides hold a few tips on how to write code that'll be easier to understand, nicer to read and more simple to maintain.
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...Kevlin Henney
Presented at ACCU (24th April 2015)
It is all to easy to dismiss problematic codebases on some nebulous idea of bad practice or bad programmers. Poor code, however, is rarely arbitrary and random in its structure or formulation. Systems of code, well or poorly structured, emerge from systems of practice, whether effective or ineffective. To improve code quality, it makes more sense to pick apart the specific practices and see their interplay — the cause — than to simply focus on the code itself — the effect. This talk looks at how a handful of coding habits, design practices and assumptions can systematically balloon code and compound its accidental complexity.
Serverless is the most clickbaity title for an actually interesting thing. Despite the name, Serverless does not mean you’re not using a server, rather, the promise of Serverless is to no longer have to babysit a server. Scaling is done for you, you’re billed only for what you use. In this session, we’ll cover some key use cases for these functions within a Vue.js application: we’ll accept payments with stripe, we’ll gather geolocation data from Google Maps, and more! We’ll make it all work with Vue and Nuxt seamlessly, simplifying how to leverage this paradigm to be a workhorse for your application.
Have you ever wanted to add a new feature to your code but instead found yourself spending hours trying to understand the existing code? Or adding a new feature and then finding out you've broken something else, supposedly unrelated, that used to work?
These slides hold a few tips on how to write code that'll be easier to understand, nicer to read and more simple to maintain.
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...Kevlin Henney
Presented at ACCU (24th April 2015)
It is all to easy to dismiss problematic codebases on some nebulous idea of bad practice or bad programmers. Poor code, however, is rarely arbitrary and random in its structure or formulation. Systems of code, well or poorly structured, emerge from systems of practice, whether effective or ineffective. To improve code quality, it makes more sense to pick apart the specific practices and see their interplay — the cause — than to simply focus on the code itself — the effect. This talk looks at how a handful of coding habits, design practices and assumptions can systematically balloon code and compound its accidental complexity.
Serverless is the most clickbaity title for an actually interesting thing. Despite the name, Serverless does not mean you’re not using a server, rather, the promise of Serverless is to no longer have to babysit a server. Scaling is done for you, you’re billed only for what you use. In this session, we’ll cover some key use cases for these functions within a Vue.js application: we’ll accept payments with stripe, we’ll gather geolocation data from Google Maps, and more! We’ll make it all work with Vue and Nuxt seamlessly, simplifying how to leverage this paradigm to be a workhorse for your application.
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Introduction to Mobile Application DevelopmentSenthil Kanth
Introduction to Mobile Application Development
This ppt contains the topic like,,
WAP Network Structure,
The WAP Gateway plays an important role,
WAP Programming Model,
WML Example,
Java Platform,
Java 2 Platform,
Virtual Machines and horizontal and vertical APIs specified in configurations and Profiles,
Configurations
Hai I'm Senthilkanth, doing MCA in Mepco Schlenk Engineering College..
The following presentation covers topic called WML for BSc CS, BCA, MSc CS, MCA, ME students.Make use of it. WML Script by Shanti katta.
This presentation agenda like,
Introduction to wireless application protocol (wap)ogiSenthil Kanth
Introduction to wireless application protocol (wap)ogi Presented by
Dragomanov Andon
Paunovski Ognen
This ppt contains the topic like,,
What is WAP?
Development and Objectives
WAP Concept
WAP 1.0 Architecture
WAP 2.0 Architecture
WAP 2.0 Features
WML
Real Life Examples
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Presentation on WAP Keerti Sharma
This ppt contains the topic like,,
What is WAP ?
Limitations of Internet for wireless applications
WAP Architecture / protocol stack
WAP Components / WML
WAP brings Internet to hand-held devices
Conclusion
Wireless Communication and Networking by WilliamStallings Chap2Senthil Kanth
Hai I'm Senthilkanth, doing MCA in Mepco Schlenk Engineering College..
The following presentation covers topic called Wireless Communication and Networking
by WilliamStallings for BSc CS, BCA, MSc CS, MCA, ME students.Make use of it.
Wireless Communication and Networking
by WilliamStallings Chapter : 2Transmission Fundamentals
Chapter 2
Electromagnetic Signal
Function of time
Can also be expressed as a function of frequency
Signal consists of components of different frequencies
Time-Domain Concepts
Analog signal - signal intensity varies in a smooth fashion over time
No breaks or discontinuities in the signal
Digital signal - signal intensity maintains a constant level for some period of time and then changes to another constant level
Periodic signal - analog or digital signal pattern that repeats over time
s(t +T ) = s(t ) -¥< t < +¥
where T is the period of the signal
Time-Domain Concepts
Aperiodic signal - analog or digital signal pattern that doesn't repeat over time
Peak amplitude (A) - maximum value or strength of the signal over time; typically measured in volts
Frequency (f )
Rate, in cycles per second, or Hertz (Hz) at which the signal repeats
Time-Domain Concepts
Period (T ) - amount of time it takes for one repetition of the signal
T = 1/f
Phase () - measure of the relative position in time within a single period of a signal
Wavelength () - distance occupied by a single cycle of the signal
Or, the distance between two points of corresponding phase of two consecutive cycles
Sine Wave Parameters
General sine wave
s(t ) = A sin(2ft + )
Figure 2.3 shows the effect of varying each of the three parameters
(a) A = 1, f = 1 Hz, = 0; thus T = 1s
(b) Reduced peak amplitude; A=0.5
(c) Increased frequency; f = 2, thus T = ½
(d) Phase shift; = /4 radians (45 degrees)
note: 2 radians = 360° = 1 period
Sine Wave Parameters
Time vs. Distance
When the horizontal axis is time, as in Figure 2.3, graphs display the value of a signal at a given point in space as a function of time
With the horizontal axis in space, graphs display the value of a signal at a given point in time as a function of distance
At a particular instant of time, the intensity of the signal varies as a function of distance from the source
Frequency-Domain Concepts
Fundamental frequency - when all frequency components of a signal are integer multiples of one frequency, it’s referred to as the fundamental frequency
Spectrum - range of frequencies that a signal contains
Absolute bandwidth - width of the spectrum of a signal
Effective bandwidth (or just bandwidth) - narrow band of frequencies that most of the signal’s energy is contained in
Frequency-Domain Concepts
Any electromagnetic signal can be shown to consist of a collection of periodic analog signals (sine waves) at different amplitudes, frequencies, and phases
The period of the total signal is equal to the period of the fundamenta
Below is my code- I have an error that I still have difficulty figurin.pdfarmanuelraj
Below is my code. I have an error that I still have difficulty figuring out. Please explain and
teach me the solution to fix it specifically (e.g. changing which line in the code). Thank you!
main.cpp
/*
Overloaded stream insertion operator <<
- used to display reports and write data to file.
Overloaded relational operator (<)
- used to sort the array in ascending order by name (insertion sort)
*/
#include "Sales.h"
#include <iostream>
#include <sstream>
#include <iomanip>
#include <fstream>
#include <string>
using namespace std;
const int MAX_SIZE = 30;
/* Write your code here:
declare the function you are going to call in this program
*/
void readData(string fileName, Sales *salesArr, int &size);
void insertSort(Sales *salesArr, int size);
double calcSalesAvg(Sales *salesArr, int size);
void displayOverAvg(Sales *salesArr, int size, double avg);
void writeReport(Sales *salesArr, int size, string fileName);
void showReport(string fileName);
int main() {
Sales salesArr[MAX_SIZE];
int size = 0;
string fileName;
cout << "Please enter the input file's name: ";
getline(cin, fileName);
readData(fileName, salesArr, size);
insertSort(salesArr, size);
double avg = calcSalesAvg(salesArr, size);
displayOverAvg(salesArr, size, avg);
writeReport(salesArr, size, fileName);
string option;
cout << "Show report?" << endl;
getline(cin, option);
if (option == "Y" || option == "y")
showReport(fileName);
return 0;
}
// function definitions
void readData(string fileName, Sales *salesArr, int &size) {
string temp;
int i = 0;
fstream ptr;
ptr.open(fileName, ios::in);
while (getline(ptr, temp)) {
size++;
stringstream chk(temp);
string t2;
int id, year, amountSold;
string fname, lname;
int j = 0;
while (getline(chk, t2, ' ')) {
if (j == 0) {
id = stoi(t2);
}
if (j == 1) {
year = stoi(t2);
}
if (j == 2) {
fname = t2;
}
if (j == 3) {
lname = t2;
}
if (j == 4) {
amountSold = stoi(t2);
}
j++;
}
string gg = fname + " " + lname;
gg[gg.size() - 1] = 0;
Sales ss(id, year, gg, amountSold);
salesArr[i] = ss;
i++;
}
ptr.close();
}
void insertSort(Sales *salesArr, int size) {
for (int i = 0; i < size; i++) {
for (int j = i + 1; j < size; j++) {
if (salesArr[j] < salesArr[i]) {
Sales temp(salesArr[i]);
salesArr[i] = salesArr[j];
salesArr[j] = temp;
}
}
}
}
double calcSalesAvg(Sales *salesArr, int size) {
double d = 0;
for (int i = 0; i < size; i++) {
d += (salesArr[i].getAmountSold());
}
return (double) d / size;
}
void displayOverAvg(Sales *salesArr, int size, double avg) {
cout << "Average Sales: " << avg << endl;
string nm ;
cout << "Salespeople with above average sales:" << endl;
for (int i = 0; i < size; i++) {
if (salesArr[i].getAmountSold() > avg) {
cout << salesArr[i];
}
}
}
void writeReport(Sales *salesArr, int size, string fileName) {
fileName.insert(fileName.find("."), "Report");
fstream ptr;
ptr.open(fileName, ios::out);
for (int i = 0; i < size; i++) {
ptr << salesArr[i];
}
ptr.close();
}
/*
This function receives the name of a file and
displays its contents to the s.
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Introduction to Mobile Application DevelopmentSenthil Kanth
Introduction to Mobile Application Development
This ppt contains the topic like,,
WAP Network Structure,
The WAP Gateway plays an important role,
WAP Programming Model,
WML Example,
Java Platform,
Java 2 Platform,
Virtual Machines and horizontal and vertical APIs specified in configurations and Profiles,
Configurations
Hai I'm Senthilkanth, doing MCA in Mepco Schlenk Engineering College..
The following presentation covers topic called WML for BSc CS, BCA, MSc CS, MCA, ME students.Make use of it. WML Script by Shanti katta.
This presentation agenda like,
Introduction to wireless application protocol (wap)ogiSenthil Kanth
Introduction to wireless application protocol (wap)ogi Presented by
Dragomanov Andon
Paunovski Ognen
This ppt contains the topic like,,
What is WAP?
Development and Objectives
WAP Concept
WAP 1.0 Architecture
WAP 2.0 Architecture
WAP 2.0 Features
WML
Real Life Examples
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Presentation on WAP Keerti Sharma
This ppt contains the topic like,,
What is WAP ?
Limitations of Internet for wireless applications
WAP Architecture / protocol stack
WAP Components / WML
WAP brings Internet to hand-held devices
Conclusion
Wireless Communication and Networking by WilliamStallings Chap2Senthil Kanth
Hai I'm Senthilkanth, doing MCA in Mepco Schlenk Engineering College..
The following presentation covers topic called Wireless Communication and Networking
by WilliamStallings for BSc CS, BCA, MSc CS, MCA, ME students.Make use of it.
Wireless Communication and Networking
by WilliamStallings Chapter : 2Transmission Fundamentals
Chapter 2
Electromagnetic Signal
Function of time
Can also be expressed as a function of frequency
Signal consists of components of different frequencies
Time-Domain Concepts
Analog signal - signal intensity varies in a smooth fashion over time
No breaks or discontinuities in the signal
Digital signal - signal intensity maintains a constant level for some period of time and then changes to another constant level
Periodic signal - analog or digital signal pattern that repeats over time
s(t +T ) = s(t ) -¥< t < +¥
where T is the period of the signal
Time-Domain Concepts
Aperiodic signal - analog or digital signal pattern that doesn't repeat over time
Peak amplitude (A) - maximum value or strength of the signal over time; typically measured in volts
Frequency (f )
Rate, in cycles per second, or Hertz (Hz) at which the signal repeats
Time-Domain Concepts
Period (T ) - amount of time it takes for one repetition of the signal
T = 1/f
Phase () - measure of the relative position in time within a single period of a signal
Wavelength () - distance occupied by a single cycle of the signal
Or, the distance between two points of corresponding phase of two consecutive cycles
Sine Wave Parameters
General sine wave
s(t ) = A sin(2ft + )
Figure 2.3 shows the effect of varying each of the three parameters
(a) A = 1, f = 1 Hz, = 0; thus T = 1s
(b) Reduced peak amplitude; A=0.5
(c) Increased frequency; f = 2, thus T = ½
(d) Phase shift; = /4 radians (45 degrees)
note: 2 radians = 360° = 1 period
Sine Wave Parameters
Time vs. Distance
When the horizontal axis is time, as in Figure 2.3, graphs display the value of a signal at a given point in space as a function of time
With the horizontal axis in space, graphs display the value of a signal at a given point in time as a function of distance
At a particular instant of time, the intensity of the signal varies as a function of distance from the source
Frequency-Domain Concepts
Fundamental frequency - when all frequency components of a signal are integer multiples of one frequency, it’s referred to as the fundamental frequency
Spectrum - range of frequencies that a signal contains
Absolute bandwidth - width of the spectrum of a signal
Effective bandwidth (or just bandwidth) - narrow band of frequencies that most of the signal’s energy is contained in
Frequency-Domain Concepts
Any electromagnetic signal can be shown to consist of a collection of periodic analog signals (sine waves) at different amplitudes, frequencies, and phases
The period of the total signal is equal to the period of the fundamenta
Below is my code- I have an error that I still have difficulty figurin.pdfarmanuelraj
Below is my code. I have an error that I still have difficulty figuring out. Please explain and
teach me the solution to fix it specifically (e.g. changing which line in the code). Thank you!
main.cpp
/*
Overloaded stream insertion operator <<
- used to display reports and write data to file.
Overloaded relational operator (<)
- used to sort the array in ascending order by name (insertion sort)
*/
#include "Sales.h"
#include <iostream>
#include <sstream>
#include <iomanip>
#include <fstream>
#include <string>
using namespace std;
const int MAX_SIZE = 30;
/* Write your code here:
declare the function you are going to call in this program
*/
void readData(string fileName, Sales *salesArr, int &size);
void insertSort(Sales *salesArr, int size);
double calcSalesAvg(Sales *salesArr, int size);
void displayOverAvg(Sales *salesArr, int size, double avg);
void writeReport(Sales *salesArr, int size, string fileName);
void showReport(string fileName);
int main() {
Sales salesArr[MAX_SIZE];
int size = 0;
string fileName;
cout << "Please enter the input file's name: ";
getline(cin, fileName);
readData(fileName, salesArr, size);
insertSort(salesArr, size);
double avg = calcSalesAvg(salesArr, size);
displayOverAvg(salesArr, size, avg);
writeReport(salesArr, size, fileName);
string option;
cout << "Show report?" << endl;
getline(cin, option);
if (option == "Y" || option == "y")
showReport(fileName);
return 0;
}
// function definitions
void readData(string fileName, Sales *salesArr, int &size) {
string temp;
int i = 0;
fstream ptr;
ptr.open(fileName, ios::in);
while (getline(ptr, temp)) {
size++;
stringstream chk(temp);
string t2;
int id, year, amountSold;
string fname, lname;
int j = 0;
while (getline(chk, t2, ' ')) {
if (j == 0) {
id = stoi(t2);
}
if (j == 1) {
year = stoi(t2);
}
if (j == 2) {
fname = t2;
}
if (j == 3) {
lname = t2;
}
if (j == 4) {
amountSold = stoi(t2);
}
j++;
}
string gg = fname + " " + lname;
gg[gg.size() - 1] = 0;
Sales ss(id, year, gg, amountSold);
salesArr[i] = ss;
i++;
}
ptr.close();
}
void insertSort(Sales *salesArr, int size) {
for (int i = 0; i < size; i++) {
for (int j = i + 1; j < size; j++) {
if (salesArr[j] < salesArr[i]) {
Sales temp(salesArr[i]);
salesArr[i] = salesArr[j];
salesArr[j] = temp;
}
}
}
}
double calcSalesAvg(Sales *salesArr, int size) {
double d = 0;
for (int i = 0; i < size; i++) {
d += (salesArr[i].getAmountSold());
}
return (double) d / size;
}
void displayOverAvg(Sales *salesArr, int size, double avg) {
cout << "Average Sales: " << avg << endl;
string nm ;
cout << "Salespeople with above average sales:" << endl;
for (int i = 0; i < size; i++) {
if (salesArr[i].getAmountSold() > avg) {
cout << salesArr[i];
}
}
}
void writeReport(Sales *salesArr, int size, string fileName) {
fileName.insert(fileName.find("."), "Report");
fstream ptr;
ptr.open(fileName, ios::out);
for (int i = 0; i < size; i++) {
ptr << salesArr[i];
}
ptr.close();
}
/*
This function receives the name of a file and
displays its contents to the s.
An object of class StatCalc can be used to compute several simp.pdfaravlitraders2012
/*
An object of class StatCalc can be used to compute several simple statistics
for a set of numbers. Numbers are entered into the dataset using
the enter(double) method. Methods are provided to return the following
statistics for the set of numbers that have been entered: The number
of items, the sum of the items, the average, the standard deviation,
the maximum, and the minimum.
*/
public class Stats {
private int count; // Number of numbers that have been entered.
private double sum; // The sum of all the items that have been entered.
private double squareSum; // The sum of the squares of all the items.
private double max = Double.NEGATIVE_INFINITY; // Largest item seen.
private double min = Double.POSITIVE_INFINITY; // Smallest item seen.
int[] myList;
public int getCount() {
System.out.println(myList.size());
count = myList.size().
// Return number of items that have been entered.
return count;
}
public double getSum() {
int sum = 0;
for (int i = 0; i < myList.length; i++)
{
sum +=mylist[i];
}
return sum;
}
public double getMean() {
int sum = 0;
for (int i = 0; i < myList.length; i++)
{
sum +=mylist[i];
}
if(count > 0)
return sum / count;
else
return -1;
}
public double getMin() {
int smallest = myList[0];
int largetst = myList[0];
for(int i=1; i< mylist.length; i++)
{
if(mylist[i] > largetst)
largetst = numbers[i];
else if (mylist[i] < smallest)
smallest = numbers[i];
}
return smallest;
}
public double getMax() {
int smallest = myList[0];
int largetst = myList[0];
for(int i=1; i< mylist.length; i++)
{
if(mylist[i] > largetst)
largetst = numbers[i];
else if (mylist[i] < smallest)
smallest = numbers[i];
}
return largetst;
}
stats(int [] data)
{
if(data.count <= count)
{
if(myList.size() > 0)
System.arraycopy( myList, 0, data, 0, count );
}
}
stats()
{
Scanner s = new Scanner(System.in);
int count = s.nextInt();
s.nextLine(); // throw away the newline.
int [] numbers = new int[count];
Scanner numScanner = new Scanner(s.nextLine());
for (int i = 0; i < count; i++) {
if (numScanner.hasNextInt()) {
numbers[i] = numScanner.nextInt();
} else {
System.out.println(\"You didn\'t provide enough numbers\");
break;
}
}
System.arraycopy( myList, 0, numbers, 0, count );
}
stats(int size)
{
setValue(size);
}
private void setValue(int size)
{
count = size;
myList = new int[size];
}
} // end class StatCalc
public class SimpleStats {
public static void main(String[] args) {
Stat calc; // Computes stats for numbers entered by user.
calc = new Stat(100);
int arry[] = {20.20.40,30.80,,70,4,5,6,7,10}
calc.setvalue(array);
double item; // One number entered by the user.
TextIO.putln(\"Enter your numbers. Enter 0 to end.\");
TextIO.putln();
do {
TextIO.put(\"? \");
item = TextIO.getlnDouble();
if (item != 0)
calc.enter(item);
} while ( item != 0 );
TextIO.putln(\"\ Statistics about your calc:\ \");
TextIO.putln(\" Count: \" + calc.getCount());
TextIO.putln(\" Sum: \" + calc.getSum());
TextIO.putln(\" Minimum: \" + calc.getMin());
TextIO.putln(\" Maximum: \" + ca.
Please follow the code and comments for description and outputs C.pdfproloyankur01
Erythrocyte Protoporphyrin
Erythrocyte Protoporphyrin ( hemoglobin precursor) begin to accumulate as hemoglobin as
hematocrit declineduring the 3rd stage of iron deficiency occurs when their is lack of iron limits
hemoglobin production.
World wide,how many people are estimated to have iron deficiency anemia
Ans; 2.0 to 2.5billion ( over 30% 0f world population according to WHO)
Solution
Erythrocyte Protoporphyrin
Erythrocyte Protoporphyrin ( hemoglobin precursor) begin to accumulate as hemoglobin as
hematocrit declineduring the 3rd stage of iron deficiency occurs when their is lack of iron limits
hemoglobin production.
World wide,how many people are estimated to have iron deficiency anemia
Ans; 2.0 to 2.5billion ( over 30% 0f world population according to WHO).
Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...ssuserd6b1fd
C++ programming language notes for beginners and Collage students. Written for beginners. Colored graphics. Function by Function explanation with complete examples. Well commented examples. Illustrations are made available for data dealing at memory level.
02 of 02 parts,
Get Part 1 from https://www.slideshare.net/ArunUmrao/introduction-to-c-programming-for-beginners-by-arunumrao-1-of-2
Introduction to c++ programming, Introduction to c++ programming, Introduction to c++ programming, Introduction to c++ programming,
So I already have most of the code and now I have to1. create an .pdfarjuncollection
So I already have most of the code and now I have to:
1. create an index file to keep track of all the inventory IDs and their locations
2. modify my class to be able to display any record with a given ID without searching through
the entire file
// This program displays the contents of the inventory file.
#include
#include
#include
using namespace std;
class DB{
// Declaration of InventoryItem structure
class InventoryItem
{
public:
char Id[5];
char desc[31];
int qty;
float price;
};
string DBname;
fstream inventory;// (DBname, ios::in | ios::binary);
public: DB(string N){ DBname = N; }// constructor
private:void Input(InventoryItem &Inv)
{
cout << \"Please type Id\" << endl;
cin >> Inv.Id;
cout << \"Please type Desc\" << endl;
cin >> Inv.desc;
cout << \"Please type qty\" << endl;
cin >> Inv.qty;
cout << \"Please type price\"<> Inv.price;
}
public: void Create(int Nrec)
{
inventory.open(DBname, ios::out | ios::binary);
// fstream inventory(\"Inventory.dat\", ios::out | ios::binary);
InventoryItem record = { \"\", \" \", 0, 0.0 };
// Write the blank records
for (int count = 0; count < Nrec; count++)
{
Input(record);
cout << \"Now writing record \" << count << endl;
inventory.write(reinterpret_cast(&record), sizeof(record));
}
// Close the file.
inventory.close();
return ;
}
public: void Display()
{
inventory.open(DBname, ios::in | ios::binary);
InventoryItem record = { \"\",\"\", 0, 0.0 };
// Now read and display the records
inventory.read(reinterpret_cast(&record),
sizeof(record));
while (!inventory.eof())
{
cout << \"Inventory Id: \";
cout << record.Id << endl;
cout << \"Description: \";
cout << record.desc << endl;
cout << \"Quantity: \";
cout << record.qty << endl;
cout << \"Price: \";
cout << record.price << endl << endl;
inventory.read(reinterpret_cast(&record), sizeof(record));
}
// Close the file.
inventory.close();
return;
}
};
int main()
{
DB Mydb(\"Inventory.dat\"); // declare a database
Mydb.Create(3); // load data
cout << \"***** display ***\" << endl;
Mydb.Display(); // print entire database
// implement the following function
// Mydb.Show(\"AB001\"); // display record with given ID
char C; cin >> C; return 0;
}
Solution
Programming Code in C++
#include
#include
#include
#include
#include
#include
using namespace std;
//Structure.
struct InvStruct
{
string iName;
int iQuantity;
double iPrice;
};
const int MAXSIZE = 9;
void addToInventory(InvStruct aList[], int& aSize);
void displayInventory(const InvStruct aList[], int aSize);
void saveToFile(const InvStruct aList[], int aSize);
void openAFile(InvStruct aList[], int& aSize);
char menuResponse();
int main(int argc, char *argv[])
{
InvStruct iRecords[MAXSIZE];
int noOfRec = 0;
bool reRun = true;
do
{
cout << \"Inventory has \" << noOfRec << \" items\" << endl;
switch (menuResponse())
{
case \'A\':
addToInventory(iRecords, noOfRec);
break;
case \'D\':
displayInventory(iRecords, noOfRec);
break;
case \'O\':
openAFile(iRecords, noOfRec);
break;
case \'S\':
saveToFile(iRecords, noOfRe.
Presented at DevWeek (25th March 2015)
These days, testing is considered a sexy topic for programmers. Who’d have thought it? But what makes for good unit tests (GUTs)? There’s more to effective unit testing than just knowing the assertion syntax of a testing framework.
Testing represents a form of communication and, as such, it offers multiple levels and forms of feedback, not just basic defect detection. Effective unit testing requires an understanding of what forms of feedback and communication are offered by tests, and what styles encourage or discourage such qualities.
What style of test partitioning is most common, and yet scales poorly and is ineffective at properly expressing the behaviour of a class or component? What styles, tricks and tips can be used to make tests more specification-like and can scale as the codebase grows?
This session will address these questions and outline exactly what makes a good unit test.
i need to write a return type function that takes information about th.docxhendriciraida
i need to write a return type function that takes information about the accident and return random number between (5,10) in c++
#include <iostream>
#include <string>
#include <cstring>
#include <cstdlib>
#include <stdio.h>
#include <time.h>
using namespace std;
const int size = 5 ;
string services [size]= {"Robbery ", "Violation ", "Medical ","Fire "};//The menu
string search;
string Thesrevice;
struct Info {
string name;
int age;
string location;
string AdditionalNote;
};
void Ask(string &z){// Function for Searching in array
cout<< "\n Your emergency?";
cout << endl;
cin>> z;
for (int i = 0 ; i< size ; i++){
if (services[i].find(z,0)!= string::npos){
cout<< "Your choice is "<< services[i]<<endl;
Thesrevice = services[i];
break;}
}}
void get_data(Info *array,int S){
cout<< "Enter Your name, age, location and any additional note"<<endl;
cin>> array[0].name>>array[1].age>>array[2].location>>
array[3].AdditionalNote;
}
int R(){
srand(time(0));
cout <<"\n"<< "Your code: "<< rand();
}
int main(){
string temp[size];
string tem;
Info Array [5];
string answer;
string repla;
cout<< " 911 What's your emergency? \n" ;
cout<< endl;
for(int i = 0; i<size ; i++){
cout<< services[i]<<"\t";}
cout<< endl;
cout<< endl;
cout << "Enter your choice as word all small, ex: fire.\n";
cout << "To repeate the menu in anoter order inter (other)\n";
cout << "To sort the menu alphabetaically inter (abc) \n";
Ask(search);
if (search == "other"){ // Shifting -right by 2
int NewIndex;
for (int i=0; i<size;i++)
{ NewIndex=i+2;
if(NewIndex >=size)
NewIndex=NewIndex % size;
temp [NewIndex]= services[i];
;}
cout<< "The new order:"<< endl;
for (int i =0; i<size; i++)
cout<< temp[i]<< "\t";
Ask(search);
}
if (search == "abc"){//Sorting Alphabetically
for (int x = 0; x < size; x++) {
for (int y = x+1; y < size; y++) {
if (services[x]>services [y]){
tem=services [x];
services[x]=services[y];
services[y]=tem;}}}
cout << "\nAlphabetical order of servisec :\n";
for (int x = 0; x < size; x++)
cout << services[x] << "\t";
cout << endl;
Ask(search);}
cout<<endl;
cout<<"___________________________________________________ \n";
cout<<endl;
get_data(Array,5);// Calling Function to get data fron user
cout<<"Okay " << Array[0].name << " calm down, we will send you help \n";
cout<<
"Your Name: "<<"\t"<< Array[0].name << "\n";
cout<<
"Your Age: "<<"\t"<< Array[1].age << "\n";
cout<<
"Your Location: "<<"\t"<< Array[2].location << "\n";
cout<<
"Additional Note: "<<"\t"<< Array[3].AdditionalNote << "\t";
cout<<"\n"<<" Please enter 1 if your info are right or 2 if you need to modify";
cin>> answer;
if (answer == "2"){
string Qrep;
string Qrepp;
string rep;
int repp;
int replaa;
cout<<"Do you want to replace? Enter Y or N"<< endl; //Adding value
cin>> Qrep;
if(Qrep == "Y"){
cout << "Is it your age? Enter Y or N"<< endl;
cin >> Qrepp;
if (Qrepp == "Y"){
cout<< "Enter your real age please!"<< end.
i want to add to this c++ code a condition so that you can only chose.docxhendriciraida
i want to add to this c++ code a condition so that you can only chose from - robbery, violation,medical, fire- if the user enterd something else the program should ask him to again chose from this service only... plz don't change the code alot just add .
#include <iostream>
#include <string>
#include <cstring>
#include <cstdlib>
#include <stdio.h>
#include <time.h>
using namespace std;
const int size = 5 ;
string services [size]= {"Robbery ", "Violation ", "Medical ","Fire "};//The menu
string search;
string Thesrevice;
struct Info {
string name;
int age;
string location;
string AdditionalNote;
};
void Ask(string &z){// Function for Searching in array
cout<< "\n Your emergency?";
cout << endl;
cin>> z;
for (int i = 0 ; i< size ; i++){
if (services[i].find(z,0)!= string::npos){
cout<< "Your choice is "<< services[i]<<endl;
Thesrevice = services[i];
break;}
}}
void get_data(Info *array,int S){
cout<< "Enter Your name, age, location and any additional note"<<endl;
cin>> array[0].name>>array[1].age>>array[2].location>>
array[3].AdditionalNote;
}
int R(){
srand(time(0));
cout <<"\n"<< "Your code: "<< rand();
}
int gethelp(){
srand(time(0));
return rand()%(10-5+1)+5;
}
int main(){
string temp[size];
string tem;
Info Array [5];
string answer;
string repla;
cout<< " 911 What's your emergency? \n" ;
cout<< endl;
for(int i = 0; i<size ; i++){
cout<< services[i]<<"\t";}
cout<< endl;
cout<< endl;
cout << "Enter your choice as word all small, ex: fire.\n";
cout << "To repeate the menu in anoter order inter (other)\n";
cout << "To sort the menu alphabetaically inter (abc) \n";
Ask(search);
if (search == "other"){ // Shifting -right by 2
int NewIndex;
for (int i=0; i<size;i++)
{ NewIndex=i+2;
if(NewIndex >=size)
NewIndex=NewIndex % size;
temp [NewIndex]= services[i];
;}
cout<< "The new order:"<< endl;
for (int i =0; i<size; i++)
cout<< temp[i]<< "\t";
Ask(search);
}
if (search == "abc"){//Sorting Alphabetically
for (int x = 0; x < size; x++) {
for (int y = x+1; y < size; y++) {
if (services[x]>services [y]){
tem=services [x];
services[x]=services[y];
services[y]=tem;}}}
cout << "\nAlphabetical order of servisec :\n";
for (int x = 0; x < size; x++)
cout << services[x] << "\t";
cout << endl;
Ask(search);}
cout<<endl;
cout<<"___________________________________________________ \n";
cout<<endl;
get_data(Array,5);// Calling Function to get data fron user
cout<<"Okay " << Array[0].name << " calm down, we will send you help \n";
cout<<
"Your Name: "<<"\t"<< Array[0].name << "\n";
cout<<
"Your Age: "<<"\t"<< Array[1].age << "\n";
cout<<
"Your Location: "<<"\t"<< Array[2].location << "\n";
cout<<
"Additional Note: "<<"\t"<< Array[3].AdditionalNote << "\t";
cout<<"\n"<<" Please enter 1 if your info are right or 2 if you need to modify";
cin>> answer;
if (answer == "2"){
string Qrep;
string Qrepp;
string rep;
int repp;
int replaa;
cout<<"Do you want to replace? Enter Y or N"<< endl; .
wireless communication and networking Chapter 1Senthil Kanth
wireless communication and networking by WilliamStallings
Hai I'm Senthilkanth, doing MCA in Mepco Schlenk Engineering College..
The following presentation covers topic called Wireless Communication and Networking
by WilliamStallings for BSc CS, BCA, MSc CS, MCA, ME students.Make use of it.
This presentation agenda like,,
Introduction
Chapter 1: Wireless Comes of Age
Chapter 2: Transmission Fundamentals
Chapter 3: Communication Networks
Chapter 4: Protocols and the TCP/IP Protocol Suite
Chapter 5: Antennas and Propagation
Chapter 6: Signal Encoding Techniques
Chapter 7: Spread Spectrum
Chapter 8: Coding and Error Control
Chapter 9: Satellite Communications
Chapter 10: Cellular Wireless Networks
Chapter 11: Cordless Systems and Wireless Local Loop
Chapter 12: Mobile IP and Wireless Access Protocol
Chapter 13: Wireless LAN Technology
Chapter 14: IEEE 802.11 Wireless LAN Standard
Chapter 15: Bluetooth
WAP- Wireless Application Protocol
by
Team 11 Presenters:
Suma Pramod Connie Barbosa
Niti Pandey Patrick Cunning
Olga Pavlenko
This ppt contains the topic like,,
WAP Introduction,
WAP architecture requirements,
Architecture overview,
World-wide web model,
WAP model,
Components of WAP architecture,
Sample Configuration of WAP technology,
Usage, Advantages & Disadvantages of WAP,
Wireless Application Protocol (WAP),
Wireless Markup Language (WML),
Generating WML with XSLT,
WAP Emulator.
Routing protocols for mobile ad-hoc networks have to
face the challenge of frequently changing topology, low
transmission power and asymmetric links. Both
proactive and reactive routing protocols prove to be
inefficient under these circumstances. The Zone Routing
Protocol (ZRP) combines the advantages of the proactive
and reactive approaches by maintaining an up-to-date
topological map of a zone centered on each node. Within
the zone, routes are immediately available. For
destinations outside the zone, ZRP employs a route
discovery procedure, which can benefit from the local
routing information of the zones.
On-Demand Multicast Routing Protocol.
This paper presents a novel multicast routing protocol for mobile ad hoc wireless networks. The protocol, termed ODMRP (On-Demand Multicast Routing Protocol), is a mesh-based, rather than a conventional tree- based, multicast scheme and uses a forwarding group concept (only a sub- set of nodes forwards the multicast packets via scoped flooding). It applies on-demand procedures to dynamically build routes and maintain multicast group membership. ODMRP is well suited for ad hoc wireless networks with mobile hosts where bandwidth is limited, topology changes frequently, and power is constrained. We evaluate ODMRP’s scalability and performance via simulation.
Routing Protocols for Ad-Hoc Networks. This is a book for Ad-hoc On-Demand Distance Vector Routing
&
DSR: The Dynamic Source Routing Protocol for Multi-Hop Wireless Ad Hoc Networks. November 2011,
Authors : Giorgos Papadakis & Manolis Surligas
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
Sectors of the Indian Economy - Class 10 Study Notes pdf
STOCK APPLICATION USING CORBA
1. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
EX NO :6 DATE : 27-8-2014
STOCK APPLICATION USING CORBA
NAME : M.F.JERINCE RAJA ROLLNO : 12LMC004
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
STOCK.IDL
*********
module stck_market
{
interface stock
{
const unsigned short SIZE = 20;
typedef string name[SIZE];
typedef short id[6];
typedef short amount[10];
typedef long shares[SIZE];
typedef string addr[SIZE];
long buyshare(in long amt,in long share);
long sellshare(in long amt,in long share);
};
};
STOCKIMPL
**********
import stck_market.*;
import org.omg.CORBA.*;
class stckimpl extends stockPOA
{
private ORB orb;
public stckimpl(ORB orb)
{
this.orb = orb;
}
public int buyshare(int amt,int share)
{
return(amt*share);
}
public int sellshare(int amt,int share)
{
return(amt*share);
}
}
SERVER
******
import stck_market.*;
import org.omg.CORBA.*;
import org.omg.CosNaming.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.POA;
import org.omg.CosNaming.NamingContextPackage.*;
public class server
{
public static void main(String args[])
2. {
try
{
ORB orb = ORB.init(args, null);
stckimpl imp_obj = new stckimpl(orb);
POA rootpoa =
POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
rootpoa.the_POAManager().activate();
org.omg.CORBA.Object ref =
rootpoa.servant_to_reference(imp_obj);
stock href = stockHelper.narrow(ref);
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");
NamingContextExt ncRef =
NamingContextExtHelper.narrow(objRef);
String name = "stock";
NameComponent path[] = ncRef.to_name( name );
ncRef.rebind(path, href);
System.out.println(" Server ready... ");
orb.run();
}
catch (Exception e)
{
System.err.println("ERROR: " + e);
e.printStackTrace(System.out);
}
System.out.println("Server Exiting ....");
}
}
CLIENT
*******
import stck_market.*;
import org.omg.CORBA.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import java.io.*;
public class client
{
public static void main(String args[])
{
try
{
int cmid = 0, csid = 0, repeat = 1,n;
int comp_id[] = new int[6];
String comp_name[] = new String[stck_market.stock.SIZE];
int shr[] = new int[stck_market.stock.SIZE];
int shr_pri[] = new int[stck_market.stock.SIZE];
String comp_addr[] = new String[stck_market.stock.SIZE];
int amt[] = new int[stck_market.stock.SIZE];
3. int cust_id[] = new int[6];
String cust_name[] = new String[stck_market.stock.SIZE];
int cust_shr[] = new int[stck_market.stock.SIZE];
String cust_addr[] = new String[stck_market.stock.SIZE];
int cust_amt[] = new int[stck_market.stock.SIZE];
int ctshr_pri[] = new int[stck_market.stock.SIZE];
BufferedReader br = new BufferedReader(new
InputStreamReader(System.in));
ORB orb = ORB.init(args, null);
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
String name = "stock";
stock obj = stockHelper.narrow(ncRef.resolve_str(name));
System.out.println("Handle obtained on server object: "+obj);
System.out.println(" CORBA APPLICATION FOR STOCK MARKET ");
System.out.println(" ~~~~~ ~~~~~~~~~~~ ~~~ ~~~~~ ~~~~~~ ");
System.out.println(" Enter the number of company & customer to be
registered : ");
n = Integer.parseInt(br.readLine());
for(int i=0;i<n;i++)
{
System.out.println("tt Company Registration ");
System.out.println(" Enter the company ID : ");
comp_id[i] = Integer.parseInt(br.readLine());
System.out.println(" Enter the company name : ");
comp_name[i] = br.readLine();
System.out.println(" Enter the company address : ");
comp_addr[i] = br.readLine();
System.out.println(" Enter the company shares : ");
shr[i] = Integer.parseInt(br.readLine());
System.out.println(" Enter the unit prize of shares : ");
shr_pri[i] = Integer.parseInt(br.readLine());
System.out.println(" Enter the total amount of shares owned :
");
amt[i] = Integer.parseInt(br.readLine());
System.out.println("tt Customer Registration ");
System.out.println(" Enter the customer ID : ");
cust_id[i] = Integer.parseInt(br.readLine());
System.out.println(" Enter the customer name : ");
cust_name[i] = br.readLine();
System.out.println(" Enter the customer address : ");
cust_addr[i] = br.readLine();
System.out.println(" Enter the number of shares owned : ");
cust_shr[i] = Integer.parseInt(br.readLine());
System.out.println(" Enter the unit prize of shares : ");
ctshr_pri[i] = Integer.parseInt(br.readLine());
System.out.println(" Enter the total amount of shares owned :
");
cust_amt[i] = Integer.parseInt(br.readLine());
}
do
{
System.out.println(" 1 - > BUY SHARES 2 - > SELL SHARES 3 - > LIST
THE DETAILS ");
System.out.println(" Enter the choice : ");
int ch = Integer.parseInt(br.readLine());
switch(ch)
{
case 1:
System.out.println("t BUY SHARES ");
System.out.println(" Enter the company ID : ");
cmid = Integer.parseInt(br.readLine());
4. System.out.println(" Enter the customer ID : ");
csid = Integer.parseInt(br.readLine());
for(int i=0;i<n;i++)
{
if(cmid==comp_id[i] && csid==cust_id[i])
{
System.out.println(" Enter the number of shares to buy : ");
int share = Integer.parseInt(br.readLine());
int unit_price = shr_pri[i];
int cur_amt = obj.buyshare(unit_price,share);
System.out.println(" Shares bought : "+share);
System.out.println(" Total amount : "+cur_amt);
shr[i] = shr[i] - share;
amt[i] = amt[i] - cur_amt;
cust_shr[i] = cust_shr[i] + share;
cust_amt[i] = cust_amt[i] + cur_amt;
break;
}}
break;
case 2:
System.out.println("t SELL SHARES ");
System.out.println(" Enter the company ID : ");
cmid = Integer.parseInt(br.readLine());
System.out.println(" Enter the customer ID : ");
csid = Integer.parseInt(br.readLine());
for(int i=0;i<n;i++)
{
if(cmid==comp_id[i] && csid==cust_id[i])
{
System.out.println(" Enter the number of shares to sell : ");
int share = Integer.parseInt(br.readLine());
int unit_price = ctshr_pri[i];
int cur_amt = obj.sellshare(unit_price,share);
System.out.println(" Shares sold : "+share);
System.out.println(" Total amount : "+cur_amt);
shr[i] = shr[i] + share;
amt[i] = amt[i] + cur_amt;
cust_shr[i] = cust_shr[i] - share;
cust_amt[i] = cust_amt[i] - cur_amt;
break;
}
}
break;
case 3:
for(int i=0;i<n;i++)
{
System.out.println("ttt Company Details ");
System.out.println("t Company ID : "+comp_id[i]);
System.out.println("t Company name : "+comp_name[i]);
System.out.println("t Company Shares : "+shr[i]);
System.out.println("t Total Amount of Shares Owned : "+amt[i]);
System.out.println("ttt Customer Details ");
System.out.println("t Customer ID : "+cust_id[i]);
System.out.println("t Customer Name : "+cust_name[i]);
System.out.println("t Total Number of Shares Owned : "+cust_shr[i]);
System.out.println("t Total Amount of Shares Owned : "+cust_amt[i]);
5. }
break;
}
System.out.println(" Press 1 to continue... ");
repeat = Integer.parseInt(br.readLine());
}while(repeat==1);
}
catch (Exception e1)
{
System.out.println("ERROR : " + e1) ;
e1.printStackTrace(System.out);
}
}
}
OUTPUT
******
Z:st>idlj -fall stock.idl
Z:st>javac *.java
Note: .stck_marketstockPOA.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Z:st>javac *.java stck_market/*.java
Note: stck_marketstockPOA.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Z:st>orbd -ORBInitialPort 2500
Z:st>java server -ORBInitialPort 2500
Server ready...
CORBA APPLICATION FOR STOCK MARKET
~~~~~ ~~~~~~~~~~~ ~~~ ~~~~~ ~~~~~~
Enter the number of company & customer to be registered :
1
Company Registration
Enter the company ID :
1234
Enter the company name :
cicso
Enter the company address :
northstreet
Enter the company shares :
100
Enter the unit priCe of shares :
50
Enter the total amount of shares owned :
80
Customer Registration
Enter the customer ID :
101
Enter the customer name :
RAJA
Enter the customer address :
M.G,.R nagar
Enter the number of shares owned :
40
Enter the unit prize of shares :
6. 40
Enter the total amount of shares owned :
10
1 - > BUY SHARES 2 - > SELL SHARES 3 - > LIST THE DETAILS
Enter the choice :
1
BUY SHARES
Enter the company ID :
1234
Enter the customer ID :
101
Enter the number of shares to buy :
15
Shares bought : 15
Total amount : 750
Press 1 to continue...
7. 40
Enter the total amount of shares owned :
10
1 - > BUY SHARES 2 - > SELL SHARES 3 - > LIST THE DETAILS
Enter the choice :
1
BUY SHARES
Enter the company ID :
1234
Enter the customer ID :
101
Enter the number of shares to buy :
15
Shares bought : 15
Total amount : 750
Press 1 to continue...