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...
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...
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...
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...
Hi, I need help to finish this program. Thank you import java.io.FileNotFoundException; import javax.swing.JFrame; /** * The Main class containing the main() and run() methods. */ public class Main { public static void main(String[] pArgs) { new Main().run(); } /** * The Roster of students that is read from the input file "gradebook.dat". */ ??? /** * A reference to the View object. */ ??? /** * This is where execution starts. Instantiate a Main object and...
JAVA :The following are descriptions of classes that you will create. Think of these as service providers. They provide a service to who ever want to use them. You will also write a TestClass with a main() method that fully exercises the classes that you create. To exercise a class, make some instances of the class, and call the methods of the class using these objects. Paste in the output from the test program that demonstrates your classes’ functionality. Testing...
M01 PA C++ Classes and Objects INTRODUCTION: Write a C++ program that implements and utilizes a Stereo Receiver Class/Object. INCLUDE IN YOUR ASSIGNMENT At the top of each of your C++ programs, you should have at least four lines of documentation: Program name (the C++ file name(s)), Author (your name), Date last updated, and Purpose (a brief description of what the program accomplishes). Here is an example: // Program name: tictactoe.cpp // Author: Rainbow Dash // Date last updated: 5/26/2016...
I need help writing c++ code to make this program. 1. Define a function that can read the input file answers.dat. This function should not print anything. 2. Define a function that computes the quiz score of the function by comparing the correct answers to the student’s answer. The result should be a percentage between 0 and 100, not a value between 0 and 1. This function should not print anything. 3. Define a function that prints the report as...
Complete the code in C#. Part 1 is one program. Part 2 is another
program. They're seperate programs, but use part 1 to figure out
part 2.
Part! Create a new console application named Demojobs. Write a program for Harold's Home Services. The program should instantiate an array of job objects and demonstrate their methods. The Job class contains four data fields-description (for example "wash windows), time in hours to complete (for example 3.5), per-hour rate charged (for example, $25.00),...
USE JAVA PLEASE And answer all questions Question 5.1 1. Write a program that reads in a number n and then reads n strings. it then reads a string s from the user and gives you the word that was typed in after s. Example input: 4 Joe Steve John Mike Steve Example output: John Example input: 7 Up Down Left Right North South East Right Example output: North 2. Remember to call your class Program Question 5.2 1. Write...