SlideShare a Scribd company logo
1 of 71
Morgage/build/classes/.netbeans_automatic_build
Morgage/build/classes/.netbeans_update_resources
Morgage/build/classes/morgage/Morgage.classpackage
morgage;
publicsynchronizedclass Morgage {
public void Morgage();
public void programFunction();
public double calculateMonthlyPropertyTax(double);
public double calculateMonthlyInsurancePremium(double);
public double calculateMonthlyPrincipleInterestLoan(double,
double);
public void display(double, double, double);
publicstatic void main(String[]);
}
Morgage/build.xml
Builds, tests, and runs the project Morgage.
Morgage/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
Morgage/nbproject/build-impl.xml
Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
Must set javac.includes
No tests executed.
Must set JVM to use for profiling in profiler.info.jvm
Must set profiler agent JVM arguments in
profiler.info.jvmargs.agent
Must select some files in the IDE or set javac.includes
To run this application from the command line without
Ant, try:
java -jar "${dist.jar.resolved}"
Must select one file in the IDE or set run.class
Must select one file in the IDE or set run.class
Must select one file in the IDE or set debug.class
Must select one file in the IDE or set debug.class
Must set fix.includes
This target only works when run from inside the NetBeans
IDE.
Must select one file in the IDE or set profile.class
This target only works when run from inside the NetBeans
IDE.
This target only works when run from inside the NetBeans
IDE.
This target only works when run from inside the NetBeans
IDE.
Must select one file in the IDE or set run.class
Must select some files in the IDE or set test.includes
Must select one file in the IDE or set run.class
Must select one file in the IDE or set applet.url
Must select some files in the IDE or set javac.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.class
Must select some method in the IDE or set test.method
Some tests failed; see details above.
Must select one file in the IDE or set test.class
Must select one file in the IDE or set test.class
Must select some method in the IDE or set test.method
Must select one file in the IDE or set applet.url
Must select one file in the IDE or set applet.url
Morgage/nbproject/genfiles.properties
build.xml.data.CRC32=c871cc12
build.xml.script.CRC32=675c98bd
[email protected]
# This file is used by a NetBeans-based IDE to track changes in
generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will
never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=c871cc12
nbproject/build-impl.xml.script.CRC32=c8d4fbeb
nbproject/[email protected]
Morgage/nbproject/private/private.properties
compile.on.save=true
user.properties.file=C:Userswindows
UserAppDataRoamingNetBeans7.4build.properties
Morgage/nbproject/project.properties
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processor.options=
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.
dir}/ap-source-output
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection
transport:
#debug.transport=dt_socket
debug.classpath=
${run.classpath}
debug.test.classpath=
${run.test.classpath}
# Files in build.classes.dir which should be excluded from
distribution jar
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/Morgage.jar
dist.javadoc.dir=${dist.dir}/javadoc
excludes=
includes=**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=
${javac.classpath}
javac.source=1.8
javac.target=1.8
javac.test.classpath=
${javac.classpath}:
${build.classes.dir}
javac.test.processorpath=
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=morgage.Morgage
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
run.classpath=
${javac.classpath}:
${build.classes.dir}
# Space-separated list of JVM arguments used when running the
project.
# You may also define separate properties like run-sys-
prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-
prop.name=value:
run.jvmargs=
run.test.classpath=
${javac.test.classpath}:
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
Morgage/nbproject/project.xml
org.netbeans.modules.java.j2seproject
Morgage
Morgage/src/morgage/Morgage.javaMorgage/src/morgage/Morg
age.java/*
* To change this license header, choose License Headers in Pro
ject Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package morgage;
import java.util.Scanner;
/**
*
* @author windows User
*/
publicclassMorgage{
publicvoid programFunction(){
System.out.println("This is a loan calculatornCalculations are t
o be done in the following stepsn");
}
publicdouble calculateMonthlyPropertyTax(double purchasePric
e){
double homeAssessedValue =0.85* purchasePrice;
double adminFee =35;
double percentageOfHomeAssessedValue =0.0063* homeAssess
edValue + adminFee;
double monthlypropertytaxpayment = percentageOfHomeAssess
edValue /12;
return monthlypropertytaxpayment;
}
publicdouble calculateMonthlyInsurancePremium(double purcha
sePrice){
double annualInsurancePremiumRate =0.0049;
double annualInsurancePremium = annualInsurancePremiumRat
e * purchasePrice;
double monthlyInsurancePremium = annualInsurancePremium /1
2;
return monthlyInsurancePremium;
}
publicdouble calculateMonthlyPrincipleInterestLoan (double loa
nAmount,double annualLoanInterestRate){
double numberOfMonthsInTheLoanPeriod =30*12;
double monthlyInterestRate =((annualLoanInterestRate/100)/12)
;
System.out.println(Math.log10(1+ monthlyInterestRate ));
double factor =Math.exp(numberOfMonthsInTheLoanPeriod *M
ath.log10(1+ monthlyInterestRate ));
double monthlyLoanPayment = factor * monthlyInterestRate * l
oanAmount -1;
return monthlyLoanPayment;
}
publicvoid display(double monthlyTaxPayment,double monthlyI
nsurancePremium,double monthlyPrincipleInterestLoanPayment
){
System.out.println("Monthly Mortgage Paymentn");
System.out.printf("Monthly Tax Payment: %.
2fn",monthlyTaxPayment);
System.out.printf("Monthly Insurance Premium:
%.2fn",monthlyInsurancePremium);
System.out.printf("Monthly Principle and Interest Loan Paymen
t: %.2fn",monthlyPrincipleInterestLoanPayment);
System.out.println("---------------------------------------------------
----");
System.out.printf("Total Monthly Mortgage Payment:
%.2fn",(monthlyTaxPayment+monthlyInsurancePremium+mon
thlyPrincipleInterestLoanPayment));
}
/**
* @param args the command line arguments
*/
publicstaticvoid main(String[] args){
double homePurchasePriceRate =0.9;
Morgage mMorgage =newMorgage();
mMorgage.programFunction();
Scanner sc=newScanner(System.in);
System.out.println("Enter your home purchase price: ");
double homePurchasePrice=sc.nextDouble();
System.out.println("Enter your loan’s annual interest rate: ");
double annualLoanInterestRate=sc.nextDouble();
System.out.println("n");
double calculatedMonthlyPropertyTax = mMorgage.calculateMo
nthlyPropertyTax(homePurchasePrice);
double calculateMonthlyInsurancePremium = mMorgage.calcula
teMonthlyInsurancePremium(homePurchasePrice);
double calculateMonthlyPrincipleInterestLoan = mMorgage.calc
ulateMonthlyPrincipleInterestLoan((homePurchasePrice*homeP
urchasePriceRate),annualLoanInterestRate);
mMorgage.display(calculatedMonthlyPropertyTax,calculate
MonthlyInsurancePremium,calculateMonthlyPrincipleInterestLo
an);
}
}
ABC Non-Profit Inc.
1234 Station Rd.
City, ST 01234
Country
Profile
Prepared By: (name)
As a researcher, explain why we study international juvenile
justice and/or youth violence (at least one paragraph).
Country#1:
Overview[footnoteRef:1]: [1: You are encouraged to use
https://www.cia.gov/library/publications/the-world-factbook/ ]
(This could include information about the geography, people,
energy, communications, transportation, etc. Citations and
references are not appropriate here. Instead, the information
should be in your own words. This section should be at least
two paragraphs.)
Summary:
(This should be a summary of the juvenile justice or youth
violence as identified in the lesson notes and readings. Citations
and references are not appropriate here. Instead, the information
should be in your own words. This section should be at least
one paragraph.)
ABC Non-Profit Inc.
1234 Station Rd.
City, ST 01234
Country
Profile
Prepared By: (name)
Country #2:
Overview[footnoteRef:2]: [2: You are encouraged to use
https://www.cia.gov/library/publications/the-world-factbook/ ]
(This could include information about the geography, people,
energy, communications, transportation, etc. Citations and
references are not appropriate here. Instead, the information
should be in your own words. This section should be at least
two paragraphs.)
Summary:
(This should be a summary of the juvenile justice or youth
violence as identified in the lesson notes and readings. Citations
and references are not appropriate here. Instead, the information
should be in your own words. This section should be at least
one paragraph.)
Country Profile, ABC Non-Profit Inc. 1 | Page
©Regis University, All Rights Reserved
Unauthorized distribution (including uploading to any non-
Regis Internet website) violates copyright law
Regis University CC&IS
CS210 Introduction to Programming
Java Programming Assignment 4: Objects and Instance Methods
All of your Alice programs have been using objects already.
And the predefined function and procedure
methods in Alice are equivalent to instance methods for those
objects in Java. You also defined your own
methods within an Alice class, which had to be applied to a
specific object in order to run.
This assignment will apply the same concepts to Java. You will
create a new class, and use the new class
to create an object in Java. Methods defined within the new
class (instance methods, similar to the Alice
procedure and function methods) will be called using the dot (.)
operator, to send a message to the object.
WARNING: This assignment will be more challenging than the
previous assignments, so make
sure to start early and allocate enough time to complete it,
including time you might need to seek
any necessary help.
Problem Summary
Suppose you wanted to modify your Mortgage Calculator from
Java programming assignment 3.
You could:
fields within an object
on methods to be instance methods within
the object’s class
o NOTE: This will eliminate the need to pass the loan data into
the methods via parameters.
Since you will be modifying your Mortgage Calculator program
from Java Assn 3, make sure you use
your instructor’s feedback to fix any mistakes from Java Assn 3
before you submit Java Assn 4.
Overview of Program
This program will contain two classes, in two separate files
within your project:
and
methods for a MortgageLoan object,
containing:
o Six data field definitions for a MortgageLoan object
o A constructor method to create a MortgageLoan object
o Four setter methods to set the values for four of the data
fields
o Four getter methods to get the values of four of the data fields
o An instance method to compute the monthly property tax.
o An instance method to compute the monthly insurance
premium.
o An instance method to compute the monthly principle and
interest loan payment.
methods, containing:
o A main method to display the program description, create an
object, read the inputs from
the user, and call the other methods.
o A static method to display a description of what the program
will do.
o A static method to display loan details.
o A static method to calculate and display the results of the
program.
Since there will be multiple files, the program will be submitted
via a .zip file (see last page).
©Regis University, All Rights Reserved
Unauthorized distribution (including uploading to any non-
Regis Internet website) violates copyright law
Program Requirements
Modify the program you wrote for Java Assn 3, as follows:
1. Define an additional Java class (File | New File | Java Class)
named:
MortgageLoan
Within the MortgageLoan class, define the following private
data fields to store properties about the
mortgage loan:
nt (double value that will hold a whole number
percent of home value, e.g. 10.0)
Remember that all private data fields defined at the class-level
can be accessed by any method within
the same class (without parameter passing).
Also within the new MortgageLoan class, you will define
instance methods that can be used with an
object of the MortgageLoan class, as follows:
a default constructor with no parameters that will
create the object with the following
initial data values set:
Loan identifier set to "" (an empty String)
Home value, loan amount, and interest rate all set to 0.0
Down payment set to 10%
Loan length set to 30 years
o Setter for loan identifier
name and zip code.
-in Java String methods to uppercase and extract
the first 4 letters of the
last name and concatenate them with the last 3 digits of the zip
code to create the loan
identifier.
o Setter for home value
home value data field to the parameter value.
o Setter for loan amount
payment percent data
fields. Be sure to convert the down payment from whole number
value to a value that
can be used in a math formula.
©Regis University, All Rights Reserved
Unauthorized distribution (including uploading to any non-
Regis Internet website) violates copyright law
o Setter for loan annual interest rate
value
MortgageLoan class:
o loan identifier (String)
o loan amount
o length of loan (in years)
o loan annual interest rate (percentage)
Each of the getters should return the data field’s current value.
– 4) from Java
Assn 3 from the MortgageCalculator
class to the MortgageLoan class. Then modify them, so they
can be used as instance methods in
the new MortgageLoan class, as follows:
o Eliminate the parameter lists from each method (parameters
will no longer be necessary).
o Keep all constants previously defined in the methods, except
for the number of loan months
defined in method 4.
number of months in the
loan, instead of the previous constant value.
o Modify the formulas to use the object data fields, instead of
parameters.
2. Within the original MortgageCalculator class that contains
the main method:
when you moved them to the
MortgageLoan class.
the main method to perform the following additional
tasks (beyond Java Assn 3):
o After displaying program description, create an object of the
new MortgageLoan class type.
o Prompt for (using descriptive prompts) and read:
ame (you can assume there will be no
spaces in the last name
and it will contain at least 4 letters).
o Same as before, prompt for (using descriptive prompts) and
read the home value and the
annual interest rate.
Sample Input
o Use the setters to set the values in the following data fields of
the object:
first.
interest rate.
Be sure to pass any necessary parameters to the setters.
Please enter the home buyer’s last name: Smith
Please enter the home’s zip code: 80221
Please enter the home value: 222222
Please enter the annual interest rate: 4.25
©Regis University, All Rights Reserved
Unauthorized distribution (including uploading to any non-
Regis Internet website) violates copyright law
o After setting all the data fields, display a couple of blank
lines to separate input and output.
o Call the two static display methods:
information (details
below)
The main method code should not calculate any results itself,
nor display any loan details or
loan payment information. All this should be done from within
the two display methods,
after being called from the main method code.
o Have only one parameter: the mortgage loan object
o Use the getters to get and display the loan’s information (loan
identifier, loan amount, loan
length, and annual percentage rate), formatted as shown in the
Sample Output below:
Details” and be indented.
places
ic method to calculate and display results from Assn
3 will need to be modified to use
the new mortgage loan object. It will:
o Have only one parameter: a mortgage loan object
o Send messages to the loan object to compute the three parts of
the monthly mortgage
payment, by calling each of the calculation instance methods.
separate local variables.
o As in Java Assn 3 display the results:
under the
header “Monthly Mortgage
Payment”, and be indented.
mortgage payment) to 2
decimal places, lined up on the decimal points.
yment.
Line all figures up on the right, to the same place as the figures
that were output from the loan
details method, as shown below.
Output from new
“loan details” method
Output from revised
“calculate and display
results” method
Loan Details
Loan identifier SMIT221
Loan amount 199999.80
Loan length 30 years
Annual interest rate 4.250%
Monthly Mortgage Payment
Monthly Taxes 102.08
Monthly Insurance 91.00
Monthly Principle & Interest 983.88
--------
Total Monthly Mortgage Payment 1176.96
©Regis University, All Rights Reserved
Unauthorized distribution (including uploading to any non-
Regis Internet website) violates copyright law
WARNING: The methods must be implemented exactly as
specified in these requirements.
If your program produces correct output, but you did not
implement the methods as specified (with
correct parameter passing and return values), you will lose a
significant number of points.
See next page for an outline of what your code should look like.
Coding Standards
The program must also follow the CS210 Coding Standards
from Content section 6.10.
You must include the following comments:
o Comments at the top of the file, above the main class,
describing what the class does
d
the version of the
code (e.g. @version 1.0, Java Assn 3)
o Comments at the top of each method, above the method
header, describing what the
method does (only this method – do not refer to actions of any
other methods)
descriptions of each parameter
and return value.
Delete any default comments supplied by the IDE that you did
not use.
Debugging and Testing
Run, test, and debug your Java program, until it works.
Then test your program with different inputs to make sure it
provides correct results.
Outline of what your MortgageCalculator.java file code should
look like:
/*
* The mortgage calculator program will do the following:
* Put program description here (expand to as many lines as
needed)
*/
import java.util.Scanner;
/**
* @author Mary Jones // your full name
* @version 1.0, Java Assn 4
*/
public class MortgageCalculator {
public static void main(String[] args) {
// Call to method 1 goes here
// Statement to create object goes here
// Statements to read user inputs go here
// Statements to call setters go here
// Statements to call display methods go here
}
// Existing method to display program description goes here
©Regis University, All Rights Reserved
Unauthorized distribution (including uploading to any non-
Regis Internet website) violates copyright law
/**
* Description of method to display loan details
*
* @param name - description of parameter
*/
public static datatype methodName (parameterList) {
// Method body display statements go here
}
/**
* Description of method to calculate and display mortgage
payment
*
* @param name - description of parameter
*/
public static datatype methodName (parameterList) {
// Method body calculation statements go here
// Method body display statements go here
}
/**
* Description of method to calculate and display mortagage
payment
*
* @param name - description of parameter
* @return name - description of return value
*/
public static datatype method4name (parameterList) {
// Constant definition goes here
// Method body statements go here here
}
}
Outline of what your MortgageLoan.java file code should look
like:
public class MortgageLoan {
// Data field definitions go here
// Constructor method documentation and definition goes
here
// Setter method documentation and definitions go here
// Getter method documentation and definitions go here
// Calculation documentation and method definitions go here
}
©Regis University, All Rights Reserved
Unauthorized distribution (including uploading to any non-
Regis Internet website) violates copyright law
Submission
This programming assignment is due by midnight of the date
listed in the Course Assignments by
Week.
Now that you have multiple class files within your project, you
will submit a single zip file containing all
of the files in your project.
o Highlight the project name.
o Click on File from the top menu, and select Export Project.
o Select To ZIP
o Name your export file in the following format:
<lastname>Assn<x>.zip
For example:
SmithAssn4.zip
NOTE: Save this zip file to some other directory, not your
project directory.
ment
submission folder (located under
the Assignments/Dropbox tab in the online course).
o Warning: Only NetBeans export files will be accepted.
Do not use any other kind of archive or zip utility.
Grading
Your program will be graded using the rubric that is linked on
the same assignment page from which this
program requirements file was downloaded.
WARNING:
Programs submitted more than 5 days past the due date will not
be accepted,
and will receive a grade of 0.

More Related Content

Similar to Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docx

CommissionCalculationbuildclasses.netbeans_automatic_build.docx
CommissionCalculationbuildclasses.netbeans_automatic_build.docxCommissionCalculationbuildclasses.netbeans_automatic_build.docx
CommissionCalculationbuildclasses.netbeans_automatic_build.docx
monicafrancis71118
 

Similar to Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docx (20)

Writing JavaScript that doesn't suck
Writing JavaScript that doesn't suckWriting JavaScript that doesn't suck
Writing JavaScript that doesn't suck
 
Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014
 
JobTestbuild.xml Builds, tests, and runs the project J.docx
JobTestbuild.xml      Builds, tests, and runs the project J.docxJobTestbuild.xml      Builds, tests, and runs the project J.docx
JobTestbuild.xml Builds, tests, and runs the project J.docx
 
Nagios Conference 2012 - Dave Josephsen - Stop Being Lazy
Nagios Conference 2012 - Dave Josephsen - Stop Being LazyNagios Conference 2012 - Dave Josephsen - Stop Being Lazy
Nagios Conference 2012 - Dave Josephsen - Stop Being Lazy
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
 
AngularJS Internal
AngularJS InternalAngularJS Internal
AngularJS Internal
 
CommissionCalculationbuildclasses.netbeans_automatic_build.docx
CommissionCalculationbuildclasses.netbeans_automatic_build.docxCommissionCalculationbuildclasses.netbeans_automatic_build.docx
CommissionCalculationbuildclasses.netbeans_automatic_build.docx
 
Advanced Dagger talk from 360andev
Advanced Dagger talk from 360andevAdvanced Dagger talk from 360andev
Advanced Dagger talk from 360andev
 
[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test
 
Java script best practices v4
Java script best practices v4Java script best practices v4
Java script best practices v4
 
Ordering System IP2buildclasses.netbeans_automatic_buildO.docx
Ordering System IP2buildclasses.netbeans_automatic_buildO.docxOrdering System IP2buildclasses.netbeans_automatic_buildO.docx
Ordering System IP2buildclasses.netbeans_automatic_buildO.docx
 
gUIsInterfacebuild.xml Builds, tests, and runs the pro.docx
gUIsInterfacebuild.xml      Builds, tests, and runs the pro.docxgUIsInterfacebuild.xml      Builds, tests, and runs the pro.docx
gUIsInterfacebuild.xml Builds, tests, and runs the pro.docx
 
Extending CMS Made Simple
Extending CMS Made SimpleExtending CMS Made Simple
Extending CMS Made Simple
 
Project3build.xml Builds, tests, and runs the project .docx
Project3build.xml      Builds, tests, and runs the project .docxProject3build.xml      Builds, tests, and runs the project .docx
Project3build.xml Builds, tests, and runs the project .docx
 
Meet Magento DE 2016 - Kristof Ringleff - Growing up with Magento
Meet Magento DE 2016 - Kristof Ringleff - Growing up with MagentoMeet Magento DE 2016 - Kristof Ringleff - Growing up with Magento
Meet Magento DE 2016 - Kristof Ringleff - Growing up with Magento
 
stateDatabuild.xml Builds, tests, and runs the project.docx
stateDatabuild.xml      Builds, tests, and runs the project.docxstateDatabuild.xml      Builds, tests, and runs the project.docx
stateDatabuild.xml Builds, tests, and runs the project.docx
 
Php unit (eng)
Php unit (eng)Php unit (eng)
Php unit (eng)
 
Backbone to React. What it says about awesome UI Code.
Backbone to React. What it says about awesome UI Code.Backbone to React. What it says about awesome UI Code.
Backbone to React. What it says about awesome UI Code.
 
Frontend training
Frontend trainingFrontend training
Frontend training
 

More from gilpinleeanna

Name 1. The table shows the number of days per week, x, that 100.docx
Name 1. The table shows the number of days per week, x, that 100.docxName 1. The table shows the number of days per week, x, that 100.docx
Name 1. The table shows the number of days per week, x, that 100.docx
gilpinleeanna
 
Name Bijapur Fort Year 1599 Location Bijapur city.docx
Name Bijapur Fort Year 1599 Location Bijapur city.docxName Bijapur Fort Year 1599 Location Bijapur city.docx
Name Bijapur Fort Year 1599 Location Bijapur city.docx
gilpinleeanna
 
Name _______________________________ (Ex2 rework) CHM 33.docx
Name  _______________________________ (Ex2 rework) CHM 33.docxName  _______________________________ (Ex2 rework) CHM 33.docx
Name _______________________________ (Ex2 rework) CHM 33.docx
gilpinleeanna
 
Name 1 Should Transportation Security Officers Be A.docx
Name 1 Should Transportation Security Officers Be A.docxName 1 Should Transportation Security Officers Be A.docx
Name 1 Should Transportation Security Officers Be A.docx
gilpinleeanna
 
Name Don’t ForgetDate UNIT 3 TEST(The direct.docx
Name   Don’t ForgetDate       UNIT 3 TEST(The direct.docxName   Don’t ForgetDate       UNIT 3 TEST(The direct.docx
Name Don’t ForgetDate UNIT 3 TEST(The direct.docx
gilpinleeanna
 
Name Abdulla AlsuwaidiITA 160Uncle VanyaMan has been en.docx
Name Abdulla AlsuwaidiITA 160Uncle VanyaMan has been en.docxName Abdulla AlsuwaidiITA 160Uncle VanyaMan has been en.docx
Name Abdulla AlsuwaidiITA 160Uncle VanyaMan has been en.docx
gilpinleeanna
 
Name Add name hereHIM 2214 Module 6 Medical Record Abstractin.docx
Name  Add name hereHIM 2214 Module 6 Medical Record Abstractin.docxName  Add name hereHIM 2214 Module 6 Medical Record Abstractin.docx
Name Add name hereHIM 2214 Module 6 Medical Record Abstractin.docx
gilpinleeanna
 
N4455 Nursing Leadership and ManagementWeek 3 Assignment 1.docx
N4455 Nursing Leadership and ManagementWeek 3 Assignment 1.docxN4455 Nursing Leadership and ManagementWeek 3 Assignment 1.docx
N4455 Nursing Leadership and ManagementWeek 3 Assignment 1.docx
gilpinleeanna
 
Name Habitable Zones – Student GuideExercisesPlease r.docx
Name  Habitable Zones – Student GuideExercisesPlease r.docxName  Habitable Zones – Student GuideExercisesPlease r.docx
Name Habitable Zones – Student GuideExercisesPlease r.docx
gilpinleeanna
 
Name Class Date SKILL ACTIVITY Giving an Eff.docx
Name    Class    Date   SKILL ACTIVITY Giving an Eff.docxName    Class    Date   SKILL ACTIVITY Giving an Eff.docx
Name Class Date SKILL ACTIVITY Giving an Eff.docx
gilpinleeanna
 
Name Speech Title I. Intro A) Atten.docx
Name  Speech Title    I. Intro  A) Atten.docxName  Speech Title    I. Intro  A) Atten.docx
Name Speech Title I. Intro A) Atten.docx
gilpinleeanna
 
n engl j med 352;16www.nejm.org april 21, .docx
n engl j med 352;16www.nejm.org april 21, .docxn engl j med 352;16www.nejm.org april 21, .docx
n engl j med 352;16www.nejm.org april 21, .docx
gilpinleeanna
 
Name Class Date HUMR 211 Spr.docx
Name     Class     Date    HUMR 211 Spr.docxName     Class     Date    HUMR 211 Spr.docx
Name Class Date HUMR 211 Spr.docx
gilpinleeanna
 
NAME ----------------------------------- CLASS -------------- .docx
NAME ----------------------------------- CLASS -------------- .docxNAME ----------------------------------- CLASS -------------- .docx
NAME ----------------------------------- CLASS -------------- .docx
gilpinleeanna
 
NAHQ Code of Ethics and Standards of Practice ©Copyright 2011 .docx
NAHQ Code of Ethics and Standards of Practice ©Copyright 2011 .docxNAHQ Code of Ethics and Standards of Practice ©Copyright 2011 .docx
NAHQ Code of Ethics and Standards of Practice ©Copyright 2011 .docx
gilpinleeanna
 
Name Understanding by Design (UbD) TemplateStage 1—Desir.docx
Name  Understanding by Design (UbD) TemplateStage 1—Desir.docxName  Understanding by Design (UbD) TemplateStage 1—Desir.docx
Name Understanding by Design (UbD) TemplateStage 1—Desir.docx
gilpinleeanna
 
Name MUS108 Music Cultures of the World .docx
Name              MUS108 Music Cultures of the World              .docxName              MUS108 Music Cultures of the World              .docx
Name MUS108 Music Cultures of the World .docx
gilpinleeanna
 

More from gilpinleeanna (20)

Name 1. The table shows the number of days per week, x, that 100.docx
Name 1. The table shows the number of days per week, x, that 100.docxName 1. The table shows the number of days per week, x, that 100.docx
Name 1. The table shows the number of days per week, x, that 100.docx
 
Name _____________________Date ________________________ESL.docx
Name  _____________________Date  ________________________ESL.docxName  _____________________Date  ________________________ESL.docx
Name _____________________Date ________________________ESL.docx
 
Name Bijapur Fort Year 1599 Location Bijapur city.docx
Name Bijapur Fort Year 1599 Location Bijapur city.docxName Bijapur Fort Year 1599 Location Bijapur city.docx
Name Bijapur Fort Year 1599 Location Bijapur city.docx
 
Name _______________________________ (Ex2 rework) CHM 33.docx
Name  _______________________________ (Ex2 rework) CHM 33.docxName  _______________________________ (Ex2 rework) CHM 33.docx
Name _______________________________ (Ex2 rework) CHM 33.docx
 
Name 1 Should Transportation Security Officers Be A.docx
Name 1 Should Transportation Security Officers Be A.docxName 1 Should Transportation Security Officers Be A.docx
Name 1 Should Transportation Security Officers Be A.docx
 
Name Don’t ForgetDate UNIT 3 TEST(The direct.docx
Name   Don’t ForgetDate       UNIT 3 TEST(The direct.docxName   Don’t ForgetDate       UNIT 3 TEST(The direct.docx
Name Don’t ForgetDate UNIT 3 TEST(The direct.docx
 
Name Add name hereConcept Matching From Disease to Treatmen.docx
Name  Add name hereConcept Matching From Disease to Treatmen.docxName  Add name hereConcept Matching From Disease to Treatmen.docx
Name Add name hereConcept Matching From Disease to Treatmen.docx
 
Name Abdulla AlsuwaidiITA 160Uncle VanyaMan has been en.docx
Name Abdulla AlsuwaidiITA 160Uncle VanyaMan has been en.docxName Abdulla AlsuwaidiITA 160Uncle VanyaMan has been en.docx
Name Abdulla AlsuwaidiITA 160Uncle VanyaMan has been en.docx
 
Name Add name hereHIM 2214 Module 6 Medical Record Abstractin.docx
Name  Add name hereHIM 2214 Module 6 Medical Record Abstractin.docxName  Add name hereHIM 2214 Module 6 Medical Record Abstractin.docx
Name Add name hereHIM 2214 Module 6 Medical Record Abstractin.docx
 
Name Sophocles, AntigoneMain Characters Antigone, Cre.docx
Name    Sophocles, AntigoneMain Characters Antigone, Cre.docxName    Sophocles, AntigoneMain Characters Antigone, Cre.docx
Name Sophocles, AntigoneMain Characters Antigone, Cre.docx
 
N4455 Nursing Leadership and ManagementWeek 3 Assignment 1.docx
N4455 Nursing Leadership and ManagementWeek 3 Assignment 1.docxN4455 Nursing Leadership and ManagementWeek 3 Assignment 1.docx
N4455 Nursing Leadership and ManagementWeek 3 Assignment 1.docx
 
Name Habitable Zones – Student GuideExercisesPlease r.docx
Name  Habitable Zones – Student GuideExercisesPlease r.docxName  Habitable Zones – Student GuideExercisesPlease r.docx
Name Habitable Zones – Student GuideExercisesPlease r.docx
 
Name Class Date SKILL ACTIVITY Giving an Eff.docx
Name    Class    Date   SKILL ACTIVITY Giving an Eff.docxName    Class    Date   SKILL ACTIVITY Giving an Eff.docx
Name Class Date SKILL ACTIVITY Giving an Eff.docx
 
Name Speech Title I. Intro A) Atten.docx
Name  Speech Title    I. Intro  A) Atten.docxName  Speech Title    I. Intro  A) Atten.docx
Name Speech Title I. Intro A) Atten.docx
 
n engl j med 352;16www.nejm.org april 21, .docx
n engl j med 352;16www.nejm.org april 21, .docxn engl j med 352;16www.nejm.org april 21, .docx
n engl j med 352;16www.nejm.org april 21, .docx
 
Name Class Date HUMR 211 Spr.docx
Name     Class     Date    HUMR 211 Spr.docxName     Class     Date    HUMR 211 Spr.docx
Name Class Date HUMR 211 Spr.docx
 
NAME ----------------------------------- CLASS -------------- .docx
NAME ----------------------------------- CLASS -------------- .docxNAME ----------------------------------- CLASS -------------- .docx
NAME ----------------------------------- CLASS -------------- .docx
 
NAHQ Code of Ethics and Standards of Practice ©Copyright 2011 .docx
NAHQ Code of Ethics and Standards of Practice ©Copyright 2011 .docxNAHQ Code of Ethics and Standards of Practice ©Copyright 2011 .docx
NAHQ Code of Ethics and Standards of Practice ©Copyright 2011 .docx
 
Name Understanding by Design (UbD) TemplateStage 1—Desir.docx
Name  Understanding by Design (UbD) TemplateStage 1—Desir.docxName  Understanding by Design (UbD) TemplateStage 1—Desir.docx
Name Understanding by Design (UbD) TemplateStage 1—Desir.docx
 
Name MUS108 Music Cultures of the World .docx
Name              MUS108 Music Cultures of the World              .docxName              MUS108 Music Cultures of the World              .docx
Name MUS108 Music Cultures of the World .docx
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Recently uploaded (20)

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 

Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docx

  • 1. Morgage/build/classes/.netbeans_automatic_build Morgage/build/classes/.netbeans_update_resources Morgage/build/classes/morgage/Morgage.classpackage morgage; publicsynchronizedclass Morgage { public void Morgage(); public void programFunction(); public double calculateMonthlyPropertyTax(double); public double calculateMonthlyInsurancePremium(double); public double calculateMonthlyPrincipleInterestLoan(double, double); public void display(double, double, double); publicstatic void main(String[]); } Morgage/build.xml Builds, tests, and runs the project Morgage. Morgage/manifest.mf Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by build
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Must set src.dir Must set test.src.dir Must set build.dir Must set dist.dir Must set build.classes.dir Must set dist.javadoc.dir Must set build.test.classes.dir Must set build.test.results.dir Must set build.classes.excludes Must set dist.jar
  • 8.
  • 9.
  • 11.
  • 12.
  • 13.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. Must set JVM to use for profiling in profiler.info.jvm Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. Must select some files in the IDE or set javac.includes
  • 28. To run this application from the command line without Ant, try: java -jar "${dist.jar.resolved}"
  • 29. Must select one file in the IDE or set run.class Must select one file in the IDE or set run.class
  • 30. Must select one file in the IDE or set debug.class Must select one file in the IDE or set debug.class Must set fix.includes
  • 31. This target only works when run from inside the NetBeans IDE. Must select one file in the IDE or set profile.class This target only works when run from inside the NetBeans IDE. This target only works when run from inside the NetBeans IDE.
  • 32. This target only works when run from inside the NetBeans IDE.
  • 33. Must select one file in the IDE or set run.class Must select some files in the IDE or set test.includes Must select one file in the IDE or set run.class Must select one file in the IDE or set applet.url
  • 34.
  • 35. Must select some files in the IDE or set javac.includes
  • 36. Some tests failed; see details above. Must select some files in the IDE or set test.includes Some tests failed; see details above. Must select some files in the IDE or set test.class Must select some method in the IDE or set test.method Some tests failed; see details above. Must select one file in the IDE or set test.class Must select one file in the IDE or set test.class Must select some method in the IDE or set test.method
  • 37. Must select one file in the IDE or set applet.url Must select one file in the IDE or set applet.url
  • 38.
  • 39. Morgage/nbproject/genfiles.properties build.xml.data.CRC32=c871cc12 build.xml.script.CRC32=675c98bd [email protected] # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=c871cc12 nbproject/build-impl.xml.script.CRC32=c8d4fbeb nbproject/[email protected] Morgage/nbproject/private/private.properties compile.on.save=true user.properties.file=C:Userswindows UserAppDataRoamingNetBeans7.4build.properties Morgage/nbproject/project.properties annotation.processing.enabled=true annotation.processing.enabled.in.editor=false
  • 40. annotation.processing.processor.options= annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources. dir}/ap-source-output build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: build.dir=build build.generated.dir=${build.dir}/generated build.generated.sources.dir=${build.dir}/generated-sources # Only compile against the classpath explicitly listed here: build.sysclasspath=ignore build.test.classes.dir=${build.dir}/test/classes build.test.results.dir=${build.dir}/test/results # Uncomment to specify the preferred debugger connection transport: #debug.transport=dt_socket debug.classpath=
  • 41. ${run.classpath} debug.test.classpath= ${run.test.classpath} # Files in build.classes.dir which should be excluded from distribution jar dist.archive.excludes= # This directory is removed when the project is cleaned: dist.dir=dist dist.jar=${dist.dir}/Morgage.jar dist.javadoc.dir=${dist.dir}/javadoc excludes= includes=** jar.compress=false javac.classpath= # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false javac.processorpath= ${javac.classpath}
  • 43. main.class=morgage.Morgage manifest.file=manifest.mf meta.inf.dir=${src.dir}/META-INF mkdist.disabled=false platform.active=default_platform run.classpath= ${javac.classpath}: ${build.classes.dir} # Space-separated list of JVM arguments used when running the project. # You may also define separate properties like run-sys- prop.name=value instead of -Dname=value. # To set system properties for unit tests define test-sys- prop.name=value: run.jvmargs= run.test.classpath= ${javac.test.classpath}: ${build.test.classes.dir} source.encoding=UTF-8
  • 44. src.dir=src test.src.dir=test Morgage/nbproject/project.xml org.netbeans.modules.java.j2seproject Morgage Morgage/src/morgage/Morgage.javaMorgage/src/morgage/Morg age.java/* * To change this license header, choose License Headers in Pro ject Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package morgage; import java.util.Scanner; /** *
  • 45. * @author windows User */ publicclassMorgage{ publicvoid programFunction(){ System.out.println("This is a loan calculatornCalculations are t o be done in the following stepsn"); } publicdouble calculateMonthlyPropertyTax(double purchasePric e){ double homeAssessedValue =0.85* purchasePrice; double adminFee =35; double percentageOfHomeAssessedValue =0.0063* homeAssess edValue + adminFee; double monthlypropertytaxpayment = percentageOfHomeAssess edValue /12; return monthlypropertytaxpayment; } publicdouble calculateMonthlyInsurancePremium(double purcha sePrice){ double annualInsurancePremiumRate =0.0049; double annualInsurancePremium = annualInsurancePremiumRat e * purchasePrice; double monthlyInsurancePremium = annualInsurancePremium /1 2; return monthlyInsurancePremium; } publicdouble calculateMonthlyPrincipleInterestLoan (double loa
  • 46. nAmount,double annualLoanInterestRate){ double numberOfMonthsInTheLoanPeriod =30*12; double monthlyInterestRate =((annualLoanInterestRate/100)/12) ; System.out.println(Math.log10(1+ monthlyInterestRate )); double factor =Math.exp(numberOfMonthsInTheLoanPeriod *M ath.log10(1+ monthlyInterestRate )); double monthlyLoanPayment = factor * monthlyInterestRate * l oanAmount -1; return monthlyLoanPayment; } publicvoid display(double monthlyTaxPayment,double monthlyI nsurancePremium,double monthlyPrincipleInterestLoanPayment ){ System.out.println("Monthly Mortgage Paymentn"); System.out.printf("Monthly Tax Payment: %. 2fn",monthlyTaxPayment); System.out.printf("Monthly Insurance Premium: %.2fn",monthlyInsurancePremium); System.out.printf("Monthly Principle and Interest Loan Paymen t: %.2fn",monthlyPrincipleInterestLoanPayment); System.out.println("--------------------------------------------------- ----"); System.out.printf("Total Monthly Mortgage Payment: %.2fn",(monthlyTaxPayment+monthlyInsurancePremium+mon thlyPrincipleInterestLoanPayment)); } /** * @param args the command line arguments */ publicstaticvoid main(String[] args){ double homePurchasePriceRate =0.9; Morgage mMorgage =newMorgage();
  • 47. mMorgage.programFunction(); Scanner sc=newScanner(System.in); System.out.println("Enter your home purchase price: "); double homePurchasePrice=sc.nextDouble(); System.out.println("Enter your loan’s annual interest rate: "); double annualLoanInterestRate=sc.nextDouble(); System.out.println("n"); double calculatedMonthlyPropertyTax = mMorgage.calculateMo nthlyPropertyTax(homePurchasePrice); double calculateMonthlyInsurancePremium = mMorgage.calcula teMonthlyInsurancePremium(homePurchasePrice); double calculateMonthlyPrincipleInterestLoan = mMorgage.calc ulateMonthlyPrincipleInterestLoan((homePurchasePrice*homeP urchasePriceRate),annualLoanInterestRate); mMorgage.display(calculatedMonthlyPropertyTax,calculate MonthlyInsurancePremium,calculateMonthlyPrincipleInterestLo an); } } ABC Non-Profit Inc. 1234 Station Rd. City, ST 01234
  • 48. Country Profile Prepared By: (name) As a researcher, explain why we study international juvenile justice and/or youth violence (at least one paragraph). Country#1: Overview[footnoteRef:1]: [1: You are encouraged to use https://www.cia.gov/library/publications/the-world-factbook/ ] (This could include information about the geography, people, energy, communications, transportation, etc. Citations and references are not appropriate here. Instead, the information should be in your own words. This section should be at least two paragraphs.)
  • 49. Summary: (This should be a summary of the juvenile justice or youth violence as identified in the lesson notes and readings. Citations and references are not appropriate here. Instead, the information should be in your own words. This section should be at least one paragraph.)
  • 50. ABC Non-Profit Inc. 1234 Station Rd. City, ST 01234 Country Profile Prepared By: (name) Country #2: Overview[footnoteRef:2]: [2: You are encouraged to use https://www.cia.gov/library/publications/the-world-factbook/ ] (This could include information about the geography, people, energy, communications, transportation, etc. Citations and references are not appropriate here. Instead, the information should be in your own words. This section should be at least two paragraphs.)
  • 51. Summary: (This should be a summary of the juvenile justice or youth violence as identified in the lesson notes and readings. Citations and references are not appropriate here. Instead, the information should be in your own words. This section should be at least one paragraph.)
  • 52. Country Profile, ABC Non-Profit Inc. 1 | Page ©Regis University, All Rights Reserved Unauthorized distribution (including uploading to any non- Regis Internet website) violates copyright law Regis University CC&IS CS210 Introduction to Programming Java Programming Assignment 4: Objects and Instance Methods
  • 53. All of your Alice programs have been using objects already. And the predefined function and procedure methods in Alice are equivalent to instance methods for those objects in Java. You also defined your own methods within an Alice class, which had to be applied to a specific object in order to run. This assignment will apply the same concepts to Java. You will create a new class, and use the new class to create an object in Java. Methods defined within the new class (instance methods, similar to the Alice procedure and function methods) will be called using the dot (.) operator, to send a message to the object. WARNING: This assignment will be more challenging than the previous assignments, so make sure to start early and allocate enough time to complete it, including time you might need to seek any necessary help. Problem Summary Suppose you wanted to modify your Mortgage Calculator from Java programming assignment 3.
  • 54. You could: fields within an object on methods to be instance methods within the object’s class o NOTE: This will eliminate the need to pass the loan data into the methods via parameters. Since you will be modifying your Mortgage Calculator program from Java Assn 3, make sure you use your instructor’s feedback to fix any mistakes from Java Assn 3 before you submit Java Assn 4. Overview of Program This program will contain two classes, in two separate files within your project: and methods for a MortgageLoan object, containing: o Six data field definitions for a MortgageLoan object o A constructor method to create a MortgageLoan object o Four setter methods to set the values for four of the data fields o Four getter methods to get the values of four of the data fields
  • 55. o An instance method to compute the monthly property tax. o An instance method to compute the monthly insurance premium. o An instance method to compute the monthly principle and interest loan payment. methods, containing: o A main method to display the program description, create an object, read the inputs from the user, and call the other methods. o A static method to display a description of what the program will do. o A static method to display loan details. o A static method to calculate and display the results of the program. Since there will be multiple files, the program will be submitted via a .zip file (see last page). ©Regis University, All Rights Reserved Unauthorized distribution (including uploading to any non- Regis Internet website) violates copyright law Program Requirements
  • 56. Modify the program you wrote for Java Assn 3, as follows: 1. Define an additional Java class (File | New File | Java Class) named: MortgageLoan Within the MortgageLoan class, define the following private data fields to store properties about the mortgage loan: nt (double value that will hold a whole number percent of home value, e.g. 10.0) Remember that all private data fields defined at the class-level can be accessed by any method within the same class (without parameter passing). Also within the new MortgageLoan class, you will define instance methods that can be used with an object of the MortgageLoan class, as follows:
  • 57. a default constructor with no parameters that will create the object with the following initial data values set: Loan identifier set to "" (an empty String) Home value, loan amount, and interest rate all set to 0.0 Down payment set to 10% Loan length set to 30 years o Setter for loan identifier name and zip code. -in Java String methods to uppercase and extract the first 4 letters of the last name and concatenate them with the last 3 digits of the zip code to create the loan identifier. o Setter for home value home value data field to the parameter value. o Setter for loan amount
  • 58. payment percent data fields. Be sure to convert the down payment from whole number value to a value that can be used in a math formula. ©Regis University, All Rights Reserved Unauthorized distribution (including uploading to any non- Regis Internet website) violates copyright law o Setter for loan annual interest rate value MortgageLoan class: o loan identifier (String) o loan amount o length of loan (in years) o loan annual interest rate (percentage) Each of the getters should return the data field’s current value.
  • 59. – 4) from Java Assn 3 from the MortgageCalculator class to the MortgageLoan class. Then modify them, so they can be used as instance methods in the new MortgageLoan class, as follows: o Eliminate the parameter lists from each method (parameters will no longer be necessary). o Keep all constants previously defined in the methods, except for the number of loan months defined in method 4. number of months in the loan, instead of the previous constant value. o Modify the formulas to use the object data fields, instead of parameters. 2. Within the original MortgageCalculator class that contains the main method: when you moved them to the MortgageLoan class. the main method to perform the following additional tasks (beyond Java Assn 3): o After displaying program description, create an object of the new MortgageLoan class type. o Prompt for (using descriptive prompts) and read:
  • 60. ame (you can assume there will be no spaces in the last name and it will contain at least 4 letters). o Same as before, prompt for (using descriptive prompts) and read the home value and the annual interest rate. Sample Input o Use the setters to set the values in the following data fields of the object: first. interest rate. Be sure to pass any necessary parameters to the setters. Please enter the home buyer’s last name: Smith Please enter the home’s zip code: 80221 Please enter the home value: 222222 Please enter the annual interest rate: 4.25
  • 61. ©Regis University, All Rights Reserved Unauthorized distribution (including uploading to any non- Regis Internet website) violates copyright law o After setting all the data fields, display a couple of blank lines to separate input and output. o Call the two static display methods: information (details below) The main method code should not calculate any results itself, nor display any loan details or loan payment information. All this should be done from within the two display methods, after being called from the main method code. o Have only one parameter: the mortgage loan object o Use the getters to get and display the loan’s information (loan identifier, loan amount, loan length, and annual percentage rate), formatted as shown in the Sample Output below:
  • 62. Details” and be indented. places ic method to calculate and display results from Assn 3 will need to be modified to use the new mortgage loan object. It will: o Have only one parameter: a mortgage loan object o Send messages to the loan object to compute the three parts of the monthly mortgage payment, by calling each of the calculation instance methods. separate local variables. o As in Java Assn 3 display the results: under the header “Monthly Mortgage Payment”, and be indented. mortgage payment) to 2 decimal places, lined up on the decimal points.
  • 63. yment. Line all figures up on the right, to the same place as the figures that were output from the loan details method, as shown below. Output from new “loan details” method Output from revised “calculate and display results” method Loan Details Loan identifier SMIT221 Loan amount 199999.80 Loan length 30 years Annual interest rate 4.250% Monthly Mortgage Payment
  • 64. Monthly Taxes 102.08 Monthly Insurance 91.00 Monthly Principle & Interest 983.88 -------- Total Monthly Mortgage Payment 1176.96 ©Regis University, All Rights Reserved Unauthorized distribution (including uploading to any non- Regis Internet website) violates copyright law WARNING: The methods must be implemented exactly as specified in these requirements. If your program produces correct output, but you did not implement the methods as specified (with correct parameter passing and return values), you will lose a significant number of points. See next page for an outline of what your code should look like. Coding Standards The program must also follow the CS210 Coding Standards from Content section 6.10. You must include the following comments:
  • 65. o Comments at the top of the file, above the main class, describing what the class does d the version of the code (e.g. @version 1.0, Java Assn 3) o Comments at the top of each method, above the method header, describing what the method does (only this method – do not refer to actions of any other methods) descriptions of each parameter and return value. Delete any default comments supplied by the IDE that you did not use. Debugging and Testing Run, test, and debug your Java program, until it works. Then test your program with different inputs to make sure it provides correct results. Outline of what your MortgageCalculator.java file code should look like: /* * The mortgage calculator program will do the following: * Put program description here (expand to as many lines as
  • 66. needed) */ import java.util.Scanner; /** * @author Mary Jones // your full name * @version 1.0, Java Assn 4 */ public class MortgageCalculator { public static void main(String[] args) { // Call to method 1 goes here // Statement to create object goes here // Statements to read user inputs go here // Statements to call setters go here // Statements to call display methods go here } // Existing method to display program description goes here
  • 67. ©Regis University, All Rights Reserved Unauthorized distribution (including uploading to any non- Regis Internet website) violates copyright law /** * Description of method to display loan details * * @param name - description of parameter */ public static datatype methodName (parameterList) { // Method body display statements go here } /** * Description of method to calculate and display mortgage payment *
  • 68. * @param name - description of parameter */ public static datatype methodName (parameterList) { // Method body calculation statements go here // Method body display statements go here } /** * Description of method to calculate and display mortagage payment * * @param name - description of parameter * @return name - description of return value */ public static datatype method4name (parameterList) { // Constant definition goes here // Method body statements go here here }
  • 69. } Outline of what your MortgageLoan.java file code should look like: public class MortgageLoan { // Data field definitions go here // Constructor method documentation and definition goes here // Setter method documentation and definitions go here // Getter method documentation and definitions go here // Calculation documentation and method definitions go here } ©Regis University, All Rights Reserved Unauthorized distribution (including uploading to any non- Regis Internet website) violates copyright law
  • 70. Submission This programming assignment is due by midnight of the date listed in the Course Assignments by Week. Now that you have multiple class files within your project, you will submit a single zip file containing all of the files in your project. o Highlight the project name. o Click on File from the top menu, and select Export Project. o Select To ZIP o Name your export file in the following format: <lastname>Assn<x>.zip For example: SmithAssn4.zip NOTE: Save this zip file to some other directory, not your project directory. ment submission folder (located under the Assignments/Dropbox tab in the online course).
  • 71. o Warning: Only NetBeans export files will be accepted. Do not use any other kind of archive or zip utility. Grading Your program will be graded using the rubric that is linked on the same assignment page from which this program requirements file was downloaded. WARNING: Programs submitted more than 5 days past the due date will not be accepted, and will receive a grade of 0.