Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to fix this code and get out put? Create a Customer class that encapsulates the concept of a customer, assuming that a customer has

Create a Customer class that encapsulates the concept of a customer, assuming that a customer has the package customerclass; public class Customerr { public static void main(String[] args) { public String name; How to fix this code and get out put?

Create a Customer class that encapsulates the concept of a customer, assuming that a customer has the following attributes: a name and a credit score. Include a constructor and setter/getter methods for name and credit score. Create a Customer Creator class to test all the methods in your class. Customer Class Include a name and creditScore class fields (instance variables). Initialize the name variable to null and the credit score variable to 300. (2 points) Include a constructor to set the name and creditScore of the customer when the object is created. The constructor should take in two parameters and should call setter methods for name and creditScore. (2 points) Create a setName method that sets the value of the customer's name. (1 point) Create a getName method that returns the name of the customer. (1 point) Create a setCreditScore method. (1 point) Add validation to the setCreditScore method. Credit score must be at least 300, otherwise it should be set to 300. (2 points) Create a getCreditScore method that returns the credit score of the customer. (1 point) Create a getCreditRating method that returns the rating of the credit score this will be based on the credit score field. (5 points) Bad (Score 200-629) . Fair (Score 630-689) . Good (Score 690-719) Excellent (Score 720-850) Customer Creator Class Create a customer object including a name and a credit score. (2 points) . Call the getName, getCreditScore, and getCreditRating for this student and print the results. (3 points)

Step by Step Solution

3.46 Rating (156 Votes )

There are 3 Steps involved in it

Step: 1

class Customer private String name private int creditScore Con... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Systems Analysis And Design

Authors: Joseph Valacich, Joey George

8th Edition

0134204921, 978-0134204925

More Books

Students also viewed these Programming questions

Question

Does the person have her/his vita posted?

Answered: 1 week ago

Question

Explain Lucass model of implementation success.

Answered: 1 week ago