A modular program IN JAVA that asks the user to enter the monthly costs for the given expenses incurred is as detailed below.
<h3>How to design a Modular Program in Java?</h3>
Module main()
// declare variablesDeclare Real loanpayment, insurance, gas,
oil, tires, maintenance,sum
// Display an intro message.
Call showIntro()
//getting loanpaymentexpense as input
Display “Enter expense incurred from loan payment:
“Input loanpayment
//getting insurance expense as input
Display “Enter expense incurred from insurance:
“Input insurance
//getting gasexpense as input
Display “Enter expense incurred from gas:
“Input gas//getting oil expense as input
Display “Enter expense incurred from oil:
“Input oil//getting tires expense asinput
Display “Enter expense incurred from tires:
“Input tires
//getting maintenance expense asinput
Display “Enter expense incurred from maintenance:
“Input maintenance
Sum = loanpayment + insurance + gas + oil + tires +
maintenance
Call monthlyCost(Sum)
Call annualCost(Sum)
Call s h o w E n d M s g ()
End main
Module showIntro()
Display “A program to calculate costs for expenses incurred
from operating automobile”
End showIntro
monthlyCost(Real Sum)
Display “Total monthly cost of expenses incurred from
operating automobile: “, Sum
End monthlyCost
annualCost(Real Sum)
Display “Total annual cost of expenses incurred from operating
automobile: “, (Sum * 12)
End annualCost
Read more about Java program at; brainly.com/question/18554491
#SPJ1