public
abstract
class
Client{
static
int
CLIENT_COUNTER = 0;
String name;
int
id; Policy[] policies;
int
numPolicies;
float
totCove;
float
ra;
public
Client(String n){ name = n; id = CLIENT_COUNTER; policies =
new
Policy[10]; numPolicies = 0; }
abstract
float
makeClaim(
int
polNum);
public
Policy openPolicyFor(
float
amt){ Policy po =
new
Policy(amt); policies[numPolicies]= po;
if
(!policies[polNum-1].isExpired())
return
policies[polNum-1].amount;
else
return
0;
}
}
public
class
CompanyClient
extends
Client{
public
CompanyClient(String name){
super
(name); } @Override
float
makeClaim(
int
polNum) {
// TODO Auto-generated method stub
//if(polNum==numPolicies)
if
(!policies[polNum-1].isExpired())
return
policies[polNum-1].amount;
else
return
0;
}
}
import
java.util.*;
public
class
ClientTestProgram {
public
static
void
main(String args[]) {
// Create an individual client, open some policies and then make some claims
IndividualClient ic =
new
IndividualClient(
"Bob B. Pins"
); ic.openPolicyFor(100); ic.openPolicyFor(200, 0.10f); ic.openPolicyFor(300,
new
GregorianCalendar(2025, 0, 2).getTime()); ic.openPolicyFor(400,
new
GregorianCalendar(1999, 5, 4).getTime()); Policy p =
new
Policy(500); System.out.println(
"Here are the Individual Client's policies:"
); System.out.println(
"Policies:"
);
for
(
int
i=0; i<ic.numPolicies; i++) { System.out.print(
" "
); ic.policies[i].print(); System.out.println(); } System.out.println(ic.numPolicies); System.out.println(
"Making claims:"
); System.out.println(
"Claim for policy 0001: "
+ ic.makeClaim(1)); System.out.println(
"Claim for policy 0002: "
+ ic.makeClaim(2)); System.out.println(
"Claim for policy 0003: "
+ ic.makeClaim(3)); System.out.println(
"Claim for policy 0004: "
+ ic.makeClaim(4));
//System.out.println("Claim for policy 0005: " + ic.makeClaim(5));
System.out.println(
"Here are the Individual Client's policies after claims:"
); System.out.println(
"Policies:"
);
for
(
int
i=0; i<ic.numPolicies; i++) {.out.print(
" "
); ic.policies[i].print(); System.out.println(); }
// Create a company client, open some policies and then make some claims
CompanyClient cc =
new
CompanyClient(
"The Pillow Factory"
); cc.openPolicyFor(1000); cc.openPolicyFor(2000, 0f); cc.openPolicyFor(3000,
new
GregorianCalendar(2025, 0, 2).getTime()); cc.openPolicyFor(4000,
new
GregorianCalendar(1999, 5, 4).getTime()); System.out.println(
"\nHere are the Company Client's policies:"
); System.out.println(
"Policies:"
); System.out.println(cc.numPolicies);
for
(
int
i=0; i<cc.numPolicies; i++) { System.out.print(
" "
); cc.policies[i].print(); System.out.println(); } System.out.println(
"Making claims:"
); System.out.println(
"Claim for policy 0006: "
+ cc.makeClaim(6)); System.out.println(cc.policies[0].amount);
System.out.println(
"Claim for policy 0007: "
+ cc.makeClaim(7));
//System.out.println("Claim for policy 0008: " + cc.makeClaim(8)); //System.out.println("Claim for policy 0009: " + cc.makeClaim(9));
System.out.println(
"Claim for policy 0005: "
+ cc.makeClaim(5)); System.out.println(
"Here are the Company Client's policies after claims:"
); System.out.println(
"Policies:"
);
for
(
int
i=0; i<cc.numPolicies; i++) { System.out.print(
" "
);
//cc.policies[i].print();
System.out.println(); } }
I have made an application, exported it as an .exe
But, using this exe (Application itself), I want to click somewhere and export another .exe, while the first exe is excuted, within the same exe, a new, separate exe file.
I'm really trying to create an app that creates another .exe and .app, with some, rects removed and some Booleans turned to false.