Complete the assignments 1. After you finish the assignments , expand the content and then make screen shot and submit your screen shot here. 2. Run the programming challenge assignments in Netbeans and submit the whole project file. A class named FeeRecord contains fields for a student’s name, enrolment number, annual fees, sports fees, and tuition fees. Write a constructor that accepts the two parameters name and enrolment number. Also write mutator and acceptor methods of the name setFees that accept the values of annual fees, sports fees, and tuition fees fields. Write a method printStudentDetails that displays the student’s name and enrolment number. The class should have a method that returns the total fees by adding annual fees, sports fees, and tuition fees. Write a program that demonstrates the class by creating a FeeRecord object, then asks the user to enter the data for a student. The program should also display the total fees amount.
Given below is the code for question. In case of any issues,
post a comment, I'll help.
If the answer helped, please do rate it. Thank you
import java.util.Scanner;
public class FeeRecord {
private String studentName;
private int enrollmentNum;
private double annualFees;
private double sportFees;
private double tuitionFees;
public FeeRecord(String name, int enrolNum) {
studentName = name;
enrollmentNum = enrolNum;
}
public void setFees(double annualF, double sportF,
double tuitionF) {
annualFees = annualF;
sportFees = sportF;
tuitionFees = tuitionF;
}
public String getStudentName() {
return studentName;
}
public int getEnrollmentNum() {
return enrollmentNum;
}
public double getAnnualFees() {
return annualFees;
}
public double getSportFees() {
return sportFees;
}
public double getTuitionFees() {
return tuitionFees;
}
public double getTotalFees() {
return annualFees + tuitionFees +
sportFees;
}
public static void main(String[] args) {
String name;
int id;
double af, tf, sf;
Scanner input = new
Scanner(System.in);
System.out.println("Enter student
details - ");
System.out.print("Name: ");
name = input.nextLine();
System.out.print("Enter enrollment
number: ");
id = input.nextInt();
FeeRecord f = new FeeRecord(name,
id);
System.out.print("Enter annual
fees: ");
af = input.nextDouble();
System.out.print("Enter tuition
fees: ");
tf = input.nextDouble();
System.out.print("Enter sports
fees: ");
sf = input.nextDouble();
f.setFees(af, sf, tf);
System.out.println("\nThe student
details are given below-");
System.out.println("Name: " +
f.getStudentName());
System.out.println("Enrollment num:
" + f.getEnrollmentNum());
System.out.println("Annual Fees: $"
+ f.getAnnualFees());
System.out.println("Sports Fees: $"
+ f.getSportFees());
System.out.println("Tuition Fees:
$" + f.getTuitionFees());
System.out.println("Total Fees: $"
+ f.getTotalFees());
}
}
output
----
Enter student details -
Name: John Smith
Enter enrollment number: 111
Enter annual fees: 1000
Enter tuition fees: 2000
Enter sports fees: 500
The student details are given below-
Name: John Smith
Enrollment num: 111
Annual Fees: $1000.0
Sports Fees: $500.0
Tuition Fees: $2000.0
Total Fees: $3500.0
Complete the assignments 1. After you finish the assignments , expand the content and then make...
this is java m. please use netbeans if you can.
7. Person and Customer Classes Design a class named Person with fields for holding a person's name, address, and telephone number. Write one or more constructors and the appropriate mutator and accessor methods for the class's fields. Next, design a class named Customer, which extends the Person class. The Customer class should have a field for a customer number and a boolean field indicating whether the cus- tomer wishes to...
It must be C++
Chapter 13 Programming Challenge 2: Employee Class.
See instruction: Chapter 13 Programming Challenge 2 Employee
Class.pdf
Program Template:
// Chapter 13, Programming Challenge 2: Employee Class
#include <iostream>
#include <string>
using namespace std;
// Employee Class Declaration
class Employee
{
private:
string name; // Employee's name
int idNumber; // ID number
string department; // Department name
string position; // Employee's position
public:
// TODO: Constructors
// TODO: Accessors
// TODO: Mutators
};
// Constructor #1
Employee::Employee(string...
Create a c++ code and answer number 1
Homework Ch. 13 - Employee Class 30 points Design a class named Employee that has the following attributes: * Name ID Number- (Employee's] Identification Number " Department-the name of the department where the employee works " Position-the employee's job title The class should have the following constructors: A constructor that accepts values for all the member data as arguments A constructor that accepts the following values as arguments and assigns them to...
using C# Write a program which calculates student grades for multiple assignments as well as the per-assignment average. The user should first input the total number of assignments. Then, the user should enter the name of a student as well as a grade for each assignment. After entering the student the user should be asked to enter "Y" if there are more students to enter or "N" if there is not ("N" by default). The user should be able to...
Write a Gui programming by using JavaFx menus, stage and screen
concepts to the RetailItem class,
Write a class named Retailltem that holds data about an item in a retail store. The class should have the following fields description: The description field is a String object that holds a brief description of the item . unitsOnHand: The unitsOnHand field is an int variable that holds the number of units currently in inventory Price: The price field is a double that...
Write java program
The purpose of this assignment is to practice OOP with Array and Arraylist, Class design, Interfaces and Polymorphism. Create a NetBeans project named HW3_Yourld. Develop classes for the required solutions. Important: Apply good programming practices Use meaningful variable and constant names. Provide comment describing your program purpose and major steps of your solution. Show your name, university id and section number as a comment at the start of each class. Submit to Moodle a compressed folder of...
Be sure to submit homework via Canvas, not email. Ask questions via email or Canvas inbox. Late assignments will not be accepted. Important: please zip the complete NetBeans project file (not just the jar or .java file) before submitting to Canvas. If you just submit the jar or .java file, it will not be graded and if you later submit the NetBeans project it may be treated as a late submission. Please name the project after your name (e.g., HWSFirstNameLastName)....
Create an abstract Student class for Parker University. The
class contains fields for student ID number, last name, and annual
tuition. Include a constructor that requires parameters for the ID
number and name. Include get and set methods for each field; the
setTuition() method is abstract.
Create three Student subclasses named UndergraduateStudent,
GraduateStudent, and StudentAtLarge, each with a unique
setTuition() method. Tuition for an UndergraduateStudent is
$4,000 per semester, tuition for a GraduateStudent
is $6,000 per semester, and tuition for...
OUTCOMES After you finish this assignment, you will be able to do the following: Define an abstract class Create concrete classes from an abstract class Overload an operator Split classes into .h and .cpp files Open files for reading Write to files Use output manipulators such as setw, fixed, and setprecision DESCRIPTION A binary arithmetic operation takes two double operands (left and right) to perform addition, subtraction, multiplication, or division on. For example, 10 + 11 is an addition (+)...
Programming Assignment 6: Object Oriented Programming Due date: Check Syllabus and Canvas Objectives: After successfully completing this assignment, students will practice Object Oriented design and programming by creating a Java program that will implement Object Oriented basic concepts. RetailItem Class: Part 1: Write a class named RetailItem that holds data about an item in a retail store. The class should have the following fields: • description. The description field references a String object that holds a brief description of the...