Code:
this is the code i have thinked of so far
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
void add_prop (void);
void mod_prop (void);
void prop_trans (void);
void menu (void);
void sale_trans (void);
void edit_street_name (void);
void edit_street_num(void);
main()
{
int stat;
printf("Welcome To Auction Me Reality Services\n");
printf("cls");
menu();
getch();
return 0;
}
void menu (void)
{
int opt, i;
printf("1. Add A Property To The System\n2. To Modify A Property On The System\n3.Starts A Transaction\n4. Exit\n");
scanf("%d", &opt);
switch (opt)
{
case 1: i = add_prop();
break;
case 2: i = mod_prop();
break;
case 3: i = prop_trans();
break;
case 4:
printf("Thank You For Using AMRS\n");
break;
default: menu();
break;
}
}
void add_prop (void)
{
int adminpass[4]={0},pass[4],u;
u = rand();
struct properties
{
int prop_id, strt_num[6];
char strt_name[20],date_bgt[9];
};
printf("Admin Please Enter Your Password to proceed\n");
scanf("%d", pass);
while strcmp(pass, adminpass == 0 )
{
printf("Please Enter Property Street Name , Street Number, Date Bought\n");
scanf("%s%%d%s", strt_name, strt_num, date_bgt);
prop_id = rand();
}
void mod_prop (void)
{
int adminpass[4]={0},pass[4]choice;
printf("Admin Please Enter Your Password to proceed\n");
scanf("%d", pass[]);
while strcmp(pass, adminpass== 0 )
{
printf("Please Enter The Property Id Number You Would Like To Modify\n");
scanf("%d", prop_id);
printf("1. edit street number\n2. edit street name\n");
scanf("%d", choice);
switch (choice )
{
case 1: edit_street_name();
break;
case 2: edit_street_num();
break;
default: menu();
break;
}
}
void prop_trans (void)
{
struct p_info
{
int tax_reg[7], p_num[7];
char name[10];
}
int count, i;
float bid, highest_bid = 0;
do
{
printf("Please Enter Your tax_reg, phone number name\n");
scanf("%d%d%s%f", &tax_reg[i], &p_num[i], &name[i]);
for (count = 0; count < 3; count++)
{
if (bid < highest_bid)
{
printf("Please Enter Your Bid");
scanf("%d", &bid);
}
}
prop_trans();
while (bid < highest_bid)
}
if (bid > highest_bid)
{
printf("this bidder now owns the house ");
}
}
void edit_street_name (void)
{
printf("Please Enter The New Street Name\n");
scanf("%s", strt_name);
}
void edit_street_num(void)
{
printf("Please Enter The New Street Number\n");
scanf("%d", strt_num);
}
its really course work for the project and this is the question
AMRS is a real estate company which purchases repossessed properties then auctions them for. interested persons are invited to make an offer on the property during a specific period, after which the person offering the highest amount on a property will be invited to purchase the prop.
the comp stores the following data on each prop, prop idnum, that is automatically generated, street name and number, date bought purchase amount begin date of offer period end date of o. period and a status to determine whether the property is available or has been sold. all props are availabe by default until an offer is made and the sale transaction finalized when the interested buyer provides a cheque for the offer amount.
persons interested in making offers provide their name tax payer reg. number. phone number, the prop that they wish to bid on and the amt being offered. upon submission of this info, a check is made to determine if the offer made is the highest offer for hat particular prop. the interested buyer can make up to 3 bid for a prop within the offer period specified, if the system determines that the amount being offered was not the highest offer. the prospective buyer is also to be informed of the number of remaining bids that can be made on that specific property. at the close of the offer peropd, if the successful bidder submits a cheque with the total amount of the offer, the prop info is updated to reflect that the prop is no longer available for purchase
you are required to design a system that will allow amrs to
add props to the system
modify data on the props
accept offers for available props
finalize sale trans
prepare a sales income report which lists for each prop its prop id num, street num and name , purchase amt sale amt and whether a profit or loss wase made on the prop. the report should be orderd by street name. the report should also sho te total money amrs spent on these props, the total money received and the total profit or loss made
prepare a report on the available props
prepare a report on the bid that have been made for a specific prop.
well there goes the question and what i have done so far am a bit on the lazy side.