Menu

Thursday, 15 February 2024

Privacy Policy for GPA Calculator App

 

Privacy Policy

Engr. Ahmad Furqan built the GPA Calculator app as a Free app. This SERVICE is provided by Engr. Ahmad Furqan at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. No Personnel Information is collected by this app. This app is a simple calculator that requires user to add some inputs and it generates the output after calculation. No data entered by the user is saved or distributed in any way in this app. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Energy Meter Accuracy Calculator unless otherwise defined in this Privacy Policy.
Information Collection and Use
For a better experience, while using our Service, I do not require you to provide us with any personally identifiable information. The information that I request will not be retained on your device or anywhere else and is not collected by me in any way.
The app does use third party services that may collect information used to identify you.
Link to privacy policy of third party service providers used by the app
Log Data
I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.
Cookies
Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.
This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.
Security
I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.

Children’s Privacy
These Services do not address anyone under the age of 13. I do not knowingly collect personally identifiable information from children under 13. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions.
Changes to This Privacy Policy
I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.
Contact Us
If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at ahmadfurqanc@gmail.com.

Wednesday, 8 March 2023

Privacy Policy for Infinite Calendar App

 

Privacy Policy

Engr. Ahmad Furqan built the Infinite Calendar app as a Free app. This SERVICE is provided by Engr. Ahmad Furqan at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. No Personnel Information is collected by this app. This app is a simple calculator that requires user to add some inputs and it generates the output after calculation. No data entered by the user is saved or distributed in any way in this app. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Energy Meter Accuracy Calculator unless otherwise defined in this Privacy Policy.
Information Collection and Use
For a better experience, while using our Service, I do not require you to provide us with any personally identifiable information. The information that I request will not be retained on your device or anywhere else and is not collected by me in any way.
The app does use third party services that may collect information used to identify you.
Link to privacy policy of third party service providers used by the app
Log Data
I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.
Cookies
Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.
This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.
Security
I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.

Children’s Privacy
These Services do not address anyone under the age of 13. I do not knowingly collect personally identifiable information from children under 13. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions.
Changes to This Privacy Policy
I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.
Contact Us
If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at ahmadfurqanc@gmail.com.

Thursday, 19 September 2019

Privacy Policy for Energy Meter Accuracy Calculator

Privacy Policy

Engr. Ahmad Furqan built the Energy Meter Accuracy Calculator app as a Free app. This SERVICE is provided by Engr. Ahmad Furqan at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. No Personnel Information is collected by this app. This app is a simple calculator that requires user to add some inputs and it generates the output after calculation. No data entered by the user is saved or distributed in any way in this app. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Energy Meter Accuracy Calculator unless otherwise defined in this Privacy Policy.
Information Collection and Use
For a better experience, while using our Service, I do not require you to provide us with any personally identifiable information. The information that I request will not be retained on your device or anywhere else and is not collected by me in any way.
The app does use third party services that may collect information used to identify you.
Link to privacy policy of third party service providers used by the app
Log Data
I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.
Cookies
Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.
This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.
Security
I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.

Children’s Privacy
These Services do not address anyone under the age of 13. I do not knowingly collect personally identifiable information from children under 13. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions.
Changes to This Privacy Policy
I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.
Contact Us
If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at ahmadfurqanc@gmail.com.

Friday, 15 May 2015

Chapter 9, Problem 7: OOP By Robert Lafore

Problem Statement:

Start with the COUNTEN2 program in this chapter. It can increment or decrement a
counter, but only using prefix notation. Using inheritance, add the ability to use postfix
notation for both incrementing and decrementing. (See Chapter 8 for a description of
postfix notation.)

Solution:

//Ahmad Furqan
//P9.7
#include <iostream>
#include <conio.h>
using namespace std;
////////////////////////////////////////////////////////////////
class Counter
{
protected: //NOTE: not private
unsigned int count; //count
public:
Counter() : count() //constructor, no args
{ }
Counter(int c) : count(c) //constructor, one arg
{ }
unsigned int get_count() const //return count
{
return count;
}
Counter operator ++ () //incr count (prefix)
{
return Counter(++count);
}
};
////////////////////////////////////////////////////////////////
class CountDn : public Counter
{
public:
CountDn() : Counter() //constructor, no args
{ }
CountDn(int c) : Counter(c) //constructor, 1 arg
{ }
CountDn operator -- () //decr count (prefix)
{
return CountDn(--count);
}
};
////////////////////////////////////////////////////////////////
class Countupdown :public CountDn
{
public:
Countupdown() :CountDn()
{}
Countupdown(int c) :CountDn(c)
{}
Countupdown operator ++(int)
{
return Countupdown(count++);
}
Countupdown operator --(int)
{
return Countupdown(count--);
}
};
////////////////////////////////////////////////////////////////
void main(void)
{
CountDn c1; //class CountDn
CountDn c2(100);
cout << "\nc1 = " << c1.get_count(); //display
cout << "\nc2 = " << c2.get_count(); //display
++c1; ++c1; c1++; //increment c1
cout << "\nc1 = " << c1.get_count(); //display it
--c2; c2--; //decrement c2
cout << "\nc2 = " << c2.get_count(); //display it
CountDn c3 = c2--; //create c3 from c2
cout << "\nc3 = " << c3.get_count(); //display c3
cout << endl;
_getch();
}

Chapter 9, Problem 6: OOP By Robert Lafore

Problem Statement:

Start with the ARROVER3 program in Chapter 8. Keep the safearay class the same as in
that program, and, using inheritance, derive the capability for the user to specify both the
upper and lower bounds of the array in a constructor. This is similar to Exercise 9 in
Chapter 8, except that inheritance is used to derive a new class (you can call it safehilo)
instead of modifying the original class.

Solution:

//Ahmad Furqan
//P9.6
#include <iostream>
#include <conio.h>
using namespace std;
#include <process.h> //for exit()
const int LIMIT = 100; //array size
////////////////////////////////////////////////////////////////
class safearay
{
private:
int arr[LIMIT];
public:
int& operator [](int n) //note: return by reference
{
if (n< 0 || n >= LIMIT)
{
cout << "\nIndex out of bounds"; exit(1);
}
return arr[n];
}
};
////////////////////////////////////////////////////////////////
class safehilo :public safearay
{
private:
int llimit, ulimit;
public:
safehilo(int a, int b) :llimit(a), ulimit(b)
{
if ((b - a) > LIMIT)
{
cout << "Array limits exceed maximum permissible range."; exit(1);
}
}
int& operator [](int n)
{
if (n < llimit || n >= ulimit)
{
cout << "\nIndex out of bounds"; _getch(); exit(1);
}
safearay::operator[](n - llimit);
}
};
////////////////////////////////////////////////////////////////
void main(void)
{
safehilo sa1(100,175);
for (int j = 100; j<175; j++) //insert elements
sa1[j] = j * 10; //*left* side of equal sign
for (int j = 100; j<175; j++) //display elements
{
int temp = sa1[j]; //*right* side of equal sign
cout << "Element " << j << " is " << temp << endl;
}
_getch();
}

Chapter 9, Problem 5: OOP by Robert Lafore

Problem Statement:

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.

Solution:

//Ahmad Furqan
//P9.5
#include <iostream>
#include <conio.h>
using namespace std;
const int LEN = 80; //maximum length of names
////////////////////////////////////////////////////////////////
class employee //employee class
{
private:
char name[LEN]; //employee name
unsigned long number; //employee number
public:
void getdata()
{
cout << "\n Enter last name : "; cin >> name;
cout << " Enter number :"; cin >> number;
}
void putdata() const
{
cout << "\n Name : " << name;
cout << "\n Number : " << number;
}
};
////////////////////////////////////////////////////////////////
class employee2 :public employee
{
private:
double compen;
enum paytype{ hourly, weakly, monthly };
paytype period;
public:
void getdata(void)
{
char a;
employee::getdata();
cout << "Enter compensation: ";
cin >> compen;
cout << "Enter payment period (h,w,m): ";
cin >> a;
switch (a)
{
case 'h':
period = hourly;
break;
case 'w':
period = weakly;
break;
case 'm':
period = monthly;
break;
}
}
void putdata(void) const
{
employee::putdata();
cout << "Employee compensation: " << compen << endl;
switch (period)
{
case hourly:
cout << "hourly" << endl;
break;
case weakly:
cout << "weakly" << endl;
break;
case monthly:
cout << "monthly" << endl;
break;
}
}
};
////////////////////////////////////////////////////////////////
class manager : public employee2 //management class
{
private:
char title[LEN]; //"vice-president" etc.
double dues; //golf club dues
public:
void getdata()
{
employee2::getdata();
cout << " Enter title : "; cin >> title;
cout << " Enter golf club dues : "; cin >> dues;
}
void putdata() const
{
employee2::putdata();
cout << "\n Title : " << title;
cout << "\n Golf club dues : " << dues;
}
};
////////////////////////////////////////////////////////////////
class scientist : public employee2 //scientist class
{
private:
int pubs; //number of publications
public:
void getdata()
{
employee2::getdata();
cout << " Enter number of pubs : "; cin >> pubs;
}
void putdata() const
{
employee2::putdata();
cout << "\n Number of publications : " << pubs;
}
};
////////////////////////////////////////////////////////////////
class laborer : public employee2 //laborer class
{};
////////////////////////////////////////////////////////////////
void main(void)
{
manager m1, m2;
scientist s1;
laborer l1;
cout << endl; //get data for several employees
cout << "\nEnter data for manager 1";
m1.getdata();
cout << "\nEnter data for manager 2";
m2.getdata();
cout << "\nEnter data for scientist 1";
s1.getdata();
cout << "\nEnter data for laborer 1";
l1.getdata();
//display data for several employees
cout << "\nData on manager 1";
m1.putdata();
cout << "\nData on manager 2";
m2.putdata();
cout << "\nData on scientist 1";
s1.putdata();
cout << "\nData on laborer 1";
l1.putdata();
cout << endl;
_getch();
}

Chapter 9, Problem 4: OOP by Robert Lafore

Problem Statement:

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.

Solution:

//Ahmad Furqan
//P9.4
#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;
title = t;
price = p;
}
void putdata(void)
{
cout << "Publication title: " << title << endl;
cout << "Publication price: " << price << endl;
}
};
class sales
{
private:
float s1, s2, s3;
public:
void getdata(void)
{
cout << "Enter month 1 sale: $";
cin >> s1;
cout << "Enter month 2 sale: $";
cin >> s2;
cout << "Enter month 3 sale: $";
cin >> s3;
}
void putdata(void)
{
cout << "Month 1 sale: $" << s1 << endl;
cout << "Month 2 sale: $" << s2 << endl;
cout << "Month 3 sale: $" << s3 << endl;
}
};
class book :public publication, public sales
{
private:
int pagecount;
public:
void getdata(void)
{
publication::getdata();
sales::getdata();
cout << "Enter Book Page Count: ";
cin >> pagecount;
}
void putdata(void)
{
publication::putdata();
sales::putdata();
cout << "Book page count: " << pagecount << endl;
}
};
class tape :public publication, public sales
{
private:
float ptime;
public:
void getdata(void)
{
publication::getdata();
sales::getdata();
cout << "Enter tap's playing time: ";
cin >> ptime;
}
void putdata(void)
{
publication::putdata();
sales::putdata();
cout << "Tap's playing time: " << ptime << endl;
}
};
class disk :public publication
{
private:
enum dtype
{CD,DVD};
dtype userchoice;
public:
void getdata(void)
{
char a;
publication::getdata();
cout << "Enter disk type (c or d) for CD and DVD: ";
cin >> a;
if (a == 'c')
userchoice = CD;
else
userchoice = DVD;

}
void putdata()
{
publication::putdata();
cout  << "Disk type is: ";
if (userchoice == CD)
cout << "CD";
else
cout << "DVD";
}
};
void main(void)
{
disk d;
d.getdata();
d.putdata();
_getch();
}

Thursday, 14 May 2015

Chapter 9, Problem 3: OOP by Robert Lafore

Problem Statement:

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.

Solution:


//Ahmad Furqan
//P9.3
#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;
title = t;
price = p;
}
void putdata(void)
{
cout << "Publication title: " << title << endl;
cout << "Publication price: " << price << endl;
}
};
class sales
{
private:
float s1, s2, s3;
public:
void getdata(void)
{
cout << "Enter month 1 sale: $";
cin >> s1;
cout << "Enter month 2 sale: $";
cin >> s2;
cout << "Enter month 3 sale: $";
cin >> s3;
}
void putdata(void)
{
cout << "Month 1 sale: $" << s1 << endl;
cout << "Month 2 sale: $" << s2 << endl;
cout << "Month 3 sale: $" << s3 << endl;
}
};
class book :public publication,public sales
{
private:
int pagecount;
public:
void getdata(void)
{
publication::getdata();
sales::getdata();
cout << "Enter Book Page Count: ";
cin >> pagecount;
}
void putdata(void)
{
publication::putdata();
sales::putdata();
cout << "Book page count: " << pagecount << endl;
}
};
class tape :public publication,public sales
{
private:
float ptime;
public:
void getdata(void)
{
publication::getdata();
sales::getdata();
cout << "Enter tap's playing time: ";
cin >> ptime;
}
void putdata(void)
{
publication::putdata();
sales::putdata();
cout << "Tap's playing time: " << ptime << endl;
}
};
void main(void)
{
book b;
tape t;
b.getdata();
t.getdata();
b.putdata();
t.putdata();
_getch();
}

Chapter 9, Problem 2: OOP by Robert Lafore

Problem Statement:

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.

Solution:

//Ahmad Furqan
//P9.2
#include <iostream>
#include <conio.h>
using namespace std;
class String
{
protected:
enum { SZ = 80 }; //max size of Strings
char str[SZ]; //array
public:
String() //constructor, no args
{
str[0] = '\0';
}
String(char s[]) //constructor, one arg
{
strcpy_s(str, s);
}
void display() //display string
{
cout << str;
}
void concat(String s2) //add arg string to
{ //this string
if (strlen(str) + strlen(s2.str) < SZ)
strcat_s(str, s2.str);
else
cout << "\nString too long";
}
};
class Pstring :public String
{
public:
Pstring()
{}
Pstring(char s[])
{
int len = strlen(s);
if (len < SZ)
strcpy_s(str, s);
else
{
for (int i = 0; i < (SZ); i++)
{
str[i] = s[i];
}
}
}
};
void main(void)
{
Pstring s, s1;
s = "Awais Irfan";
s1 = "This string will surely exceed the width of the screen, which is what the SZ constant represents.";
s.display();
cout << endl;
s1.display();
cout << endl;
_getch();
}

Chapter 9,Problem 1:OOP by Robert Lafore


Problem Statement:


Imagine a publishing company that markets both book and audiocassette versions of its
works. Create a class publication that stores the title (a string) and price (type float)
of a publication. From this class derive two classes: book, which adds a page count (type
int), and tape, which adds a playing time in minutes (type float). Each of these three
classes should have a getdata() function to get its data from the user at the keyboard,
and a putdata() function to display its data.
Write a main() program to test the book and tape classes by creating instances of them,
asking the user to fill in data with getdata(), and then displaying the data with putdata().

Solution:

//Ahmad Furqan
//P9.1
#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;
title = t;
price = p;
}
void putdata(void)
{
cout << "Publication title: " << title << endl;
cout << "Publication price: " << price<<endl;
}
};
class book :public publication
{
private:
int pagecount;
public:
void getdata(void)
{
publication::getdata(); //call publication class function to get data
cout << "Enter Book Page Count: "; //Acquire book data from user
cin >> pagecount;
}
void putdata(void)
{
publication::putdata();  //Show Publication data
cout << "Book page count: " << pagecount << endl; //Show book data
}
};
class tape :public publication
{
private:
float ptime;
public:
void getdata(void)
{
publication::getdata();
cout << "Enter tap's playing time: ";
cin >> ptime;
}
void putdata(void)
{
publication::putdata();
cout << "Tap's playing time: " << ptime << endl;
}
};
void main(void)
{
book b;
tape t;
b.getdata();
t.getdata();
b.putdata();
t.putdata();
_getch();
}

Wednesday, 13 May 2015

Chapter 5,Problem k: Let Us C

Problem Statement:

Write a function to compute the greatest common divisor
given by Euclid’s algorithm, exemplified for J = 1980, K =
1617 as follows:
1980 / 1617 = 1 1980 – 1 * 1617 = 363
1617 / 363 = 4 1617 – 4 * 363 = 165
363 / 165 = 2 363 – 2 * 165 = 33
5 / 33 = 5 165 – 5 * 33 = 0
Thus, the greatest common divisor is 33.

Solution:

//Ahmad Furqan
//P5.k
#include <iostream>
#include <conio.h>
using namespace std;
int gcd_euclid(int j, int k)
{
int a, b;
while (k > 0)
{
a = j / k;
b = k;
k = j - a*k;
j = b;
}
return j;
}
void main(void)
{
int j, k;
cout << "Enter a number: ";
cin >> j;
cout << "Enter second number: ";
cin >> k;
cout << "Greatest common divisor of " << j << " and " << k << " is: " << gcd_euclid(j, k);
_getch();
}

Chapter 5,Problem j: Let Us C

Problem Statement:

Write a function to compute the distance between two points
and use it to develop another function that will compute the
area of the triangle whose vertices are A(x1, y1), B(x2, y2),
and C(x3, y3).

Solution:

//Ahmad Furqan
//P5.j
#include <iostream>
#include <conio.h>
using namespace std;
float pdist(int x1, int y1, int x2, int y2)
{
float dist;
dist = sqrt((y2-y1)*(y2-y1)+(x2-x1)*(x2-x1));
return dist;
}
float triarea(float a, float b, float c)
{
float s;
float area;
s = (a + b + c) / 2;
area = sqrt(s*(s - a)*(s - b)*(s - c));
return area;
}
void main(void)
{
int x1, x2, x3, y1, y2, y3;
float a, b, c;
cout << "Enter point 1: ";
cout << "Enter x: ";
cin >> x1;
cout << "Enter y:";
cin >> y1;
cout << "Enter point 2:";
cout << "Enter x:";
cin >> x2;
cout << "Enter y";
cin >> y2;
cout << "Enter point 3:";
cout << "Enter x:";
cin >> x3;
cout << "Enter y:";
cin >> y3;
a = pdist(x1, y1, x2, y2);
b = pdist(x2, y2, x3, y3);
c = pdist(x1, y1, x3, y3);
cout << "Area of triangle bounded by these points is: " << triarea(a, b, c);
_getch();
}