Answered step by step
Verified Expert Solution
Question
1 Approved Answer
UCF - COP 3 3 3 0 - unit 2 . hw ( Another look at Unit 1 . hw ) At Simple College, a
UCFCOP unithw
Another look at Unithw
At Simple College, a student must take exactly two classes. The purpose of
this assignment is to write a Java program that generates a fee invoice
for a student. That requires the input of Students id and full name as
Strings, the two course numbers and their corresponding credit hours See
sample run below
It costs dollars per one credit hour, and each student is charged
$ for health and id services.
After inputting all the necessary data see sample run below an invoice,
as shown below, is printed to the screen.
SIMPLE COLLEGE
ORLANDO FL
Fee Invoice Prepared for:
Ericka J JonesV
Credit Hour $
CRN CREDIT HOURS
$
$
Health & id fees $
Total Payments $
You may assume that the user of your code enters correct information
No need to worry about any exception handling Also, it is not
required to have the exact number of white spacesskipped lines as
shown in the invoice above, but a similar indentation is expected.
Submit your code, the java file. Check that you submitted the
correct file. Please dont ask the instructor to check your code or
to check if you have submitted the correct file!
Whether your work solo or in groups, submission of the hw on
Webcourses is individual. If you end up working on this hw in groups
up to per group write the full name of all the group members, as
a comment.
This time, you will create two classes: FeeInvoice and DriverClass.
The FeeInvoice class has the following fields and methods:
studentName and studentId: String
crn creditHours crn and creditHours: int
Note that data is to be set as private!
Setters and getters for all the fileds. Note that you may
choose not to invoke the setters and the getters, but have
them in all cases.
One constructor:
FeeInvoicestring studentName
string studentid
int crn
int creditHours
int crn
int creditHours
private double calculateTotalPayment to return the total
payment amount.
public void printFeeInvoice to print the invoice as shown
in the sample run below. Note that this method should call
calculateTotalPayment to get the total amount.
A skeleton for the DriverClass and FeeInvoide classes is provided
below DriverClassjava Once done, submit your DriverClass.java
Once again, submit one jave file
unithw
Group members: John Jones, Jenna Johnson, James Junaid
imports
public class DriverClass
public static void mainString args
String studentName, studentId;
int crn creditHours crn crediHours;
Scanner scanner new Scanner System.in ;
Ask the user to enter the name id the crns and the credit hours as
show in the sample run yes exactly as shown in the sample run!
Instantiation of FeeInvoice
FeeInvoice feeInvoice new FeeInvoice studentName
studentId
crn
creditHours
crn
creditHours ;
Printing the fee invoice
feeInvoice.printFeeInvoice ;
end of main
class FeeInvoice
add code as specified
Sample Run The users keyboard try is marked in bold
Enter the Students Id: V
Enter the Students full name: Ericka J Jones
Enter crncredit hours for the first class:
Enter crncredit hours for the second class:
Thank you!
HERE IS THE FEE INVOICE...
SIMPLE COLLEGE
ORLANDO FL
Fee Invoice Prepared for:
Ericka J JonesV
Credit Hour $
CRN CREDIT HOURS
$
$
Health & id fees $
Total Payments $
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started