-
Notifications
You must be signed in to change notification settings - Fork 0
/
project_contract.sol
58 lines (54 loc) · 1.16 KB
/
project_contract.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract Storage {
struct personal_data{
bool Land;
bool house;
bool sanitation;
bool illerate;
bool employed;
bool safe_water;
bool deprived_caste;
}
personal_data p;
uint check=0;
function land_less(bool ans) public {
p.Land = ans;
if(ans){
check++;
}
}
function dilapidated_house(bool ans) public {
p.house = ans;
if(ans){
check++;
}
}
function sanitation(bool ans) public {
p.sanitation = ans;
if(ans){
check++;
}
}
function illerate(bool ans) public {
p.illerate = ans;
if(ans){
check++;
}
}
function employed(bool ans) public {
p.employed = ans;
if(ans){
check++;
}
}
function check_status() public view returns (string memory){
string memory message;
if(check>=4){
message="applicable to certain policy";
}else{
message="Not applicable to certain policy";
}
return message;
}
}