Look at the following description of a problem domain:
The bank offers the following types of accounts to its customers: savings accounts, checking accounts, and money market accounts. Customers are allowed to deposit money into an account (thereby increasing its balance), withdraw money from an account (thereby decreasing its balance), and earn interest on an account. Each account has an interest rate.
Assume that you are writing an application that will calculate the amount of interest earned for a bank account.
- a. Identify the potential classes in this problem domain.
- b. Refine the list to include only the necessary class or classes for this problem.
- c. Identify the responsibilities of the class or classes.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Starting Out with Java: Early Objects, Student Value Edition (6th Edition)
Additional Engineering Textbook Solutions
Experiencing MIS
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Starting Out With Visual Basic (8th Edition)
C Programming Language
Artificial Intelligence: A Modern Approach
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
- In java programming language Design a class named Account that contains:• A private double data field named annualInterestRate that stores the current interest rate.Assume all accounts have the same interest rate (i.e. static member data).• A private int data field named nextAccountNb that stores the next account number to beassigned (default 300). Assume all accounts use this data member to assign the account number while creating an account (i.e. static member data).• A private int data field named accounNb for the account.• A private String data field named f_name for first name.• A private String data field named l_name for last name.• A private double data field named balance for the account.• A private Date data field named dateCreated that stores the date when the account wascreated. (usejava.util.Dateclass)• A constructor that creates an account for a given first name, last name, and initial balance. It sets up a new account number, first name, last name, balance, date of…arrow_forwardThe dealership sells different types of vehicles: cars and trucks. All vehicles have a make, model, and year. However, a truck has an additional attribute - maximum load capacity (in pounds). Create a class named Vehicle with the following attributes: make, model, and year. Include the following methods: display_info(): This method should print all these details in a formatted string. get_age(): This method should calculate and return the age of the vehicle based on the current year. Tip: You will need to import functionality from the datetime module to do this. Create a class named Truck that inherits from the Vehicle class. This class should have an additional attribute, max_load, which represents the maximum load capacity of the truck. Include the following methods: display_info(): This method should override the method from Vehicle, and when it's called, it should display the truck's make, model, year, and maximum load capacity. can_carry(weight): This method should take a…arrow_forwardSanchez Construction Loan Co. make loans of up to R100, 000 for construction projects. There rea two categories of Loans – those to business and those to individual applications. Write an application that tracks all new construction loans. The application must also calculate the total amount owed at the due date (original loan amount + loan fee). The application should include the following classes: Loan: An abstract class that implements the LoanConstants interface. A Loan includes a loan number, customer last name, amount of loan, interest rate, and term. The construct requires data for each field except interest rate. Do not allow loan amount over R100.000. Force any loan term that is not one of the three defined in the LoanConstants class to a short-term, 1-year loan. Create a toString() method that displays all the loan data. LoanConstants: An interface class, LoanConstants include constant values for short-term (1 year), medium-term (3 year), and long-term (5 years) loans.…arrow_forward
- Sanchez Construction Loan Co. make loans of up to R100, 000 for construction projects. There rea two categories of Loans – those to business and those to individual applications. Write an application that tracks all new construction loans. The application must also calculate the total amount owed at the due date (original loan amount + loan fee). The application should include the following classes: Loan: An abstract class that implements the LoanConstants interface. A Loan includes a loan number, customer last name, amount of loan, interest rate, and term. The construct requires data for each field except interest rate. Do not allow loan amount over R100.000. Force any loan term that is not one of the three defined in the LoanConstants class to a short-term, 1-year loan. Create a toString() method that displays all the loan data. LoanConstants: An interface class, LoanConstants include constant values for short-term (1 year), medium-term (3 year), and long-term (5 years) loans.…arrow_forwardIn c# i need to Create an application named TestSoccerPlayer that instantiates and displays a SoccerPlayer object. The SoccerPlayer class contains the following properties: Name - The player’s name ( a string) JerseyNum - The player's jersey number (an integer) Goals - Number of goals scored (an integer) Assists - Number of assists (an integer) using static System.Console; class TestSoccerPlayer { static void Main() { // Write your main here. } } class SoccerPlayer { // Write your SoccerPlayer class here. }arrow_forwardBook Donation App Create a book-app directory. The app can be used to manage book donations and track donors and books. The catalog is implemented using the following classes: 1. The app should have donors-repo.js to maintain the list of donors and allow adding, updating, and deleting donors. The donor object has donorID, firstName, lastName, and email properties. This module should implement the following functions: • getDonor(donorId): returns a donor by id. • addDonor(donor): adds a donor to the list of donors; donorID should be autoassigned a random number. • updateDonor(donor): updates the donor having the matching donorID. • deleteDonor(donorID): delete the donor with donorID from the list of donors, only if they are not associated with any books. 2. The app should have books-repo.js to maintain the list of donated books and allow adding, updating, and deleting books. The book object has bookID, title, authors, and donorID properties. • donorID references the book’s donor. This…arrow_forward
- Class Assignment This object represents a school assignment that a student will work on. __init__(self, name: str, difficulty: float): """ Constructs an assignment with the given assignment name and a float that indicates the level of difficulty of the assignment. :param name: The name of the assignment :param difficulty: The level of difficulty of the assignment """ get_name(self) -> str: """ Returns the name of the assignment as specified in the constructor. :return: The assignment name """ get_difficulty(self) -> str: """ Returns the level of difficulty of the assignment as specified in the constructor. :return: The assignment level """ __str__(self) -> str: """ Returns the name of the assignment as specified in the constructor. :return: The assignment name """arrow_forwardDesign a class named StockTransaction that holds a stock symbol (typically one to four characters), stock name, and price per share. Include methods to set and get the values for each data field. Create the class diagram and write the pseudocode that defines the class. Design an application that declares two StockTransaction objects and sets and displays their values.arrow_forwardCreate a console-based application in C# called Farm Inventory App that meets the requirements below.1. Create a class and name it Farm.2. The Farm class must have the following properties:•Location as string•FarmSize as int•FarmCost as int3. Define two constructors in the Farm class.The first constructor receives no argument and sets default values to the properties (the default value for string is an empty string, and for int it's 0).The second constructor must receive and set the values for Location, Farmsize, and FarmCost as arguments. 4. Create a method named ShowFarminformation in the class to display the properties of the object.arrow_forward
- Create a console-based application in C# called Farm Inventory App thatmeets the requirements below: 1. Create a class and name it Farm. 2.The Farm class must have the following properties:•Location as string•FarmSize as int•FarmCost as int3. Define two constructors in the Farm class.The first constructor receives no argument and sets default values to the properties (the default value for string is an empty string, and for int its 0). The second constructor must receive and set the values for Location, Farmsize, and FarmCost as arguments.4. Create a method named ShowFarminformation in the class to display the properties of the object.arrow_forwardMake use of C# in Visual Studio. The below form will represent the main form from which the user will navigate to the other forms. Meaning each button should be linked to the appropriate form. E.g. If button Manage Addresses is clicked the form managed addresses should be displayed. The Exit button should successfully terminate the program. Create a void method for each button and name them as follow: LinkToAddresses (), LinkToCustomers (), LinkToDrivers (), LinkToStatus (), and LinkToFreight (). The methods should be called under the appropriate button. For the exit button create a void method named AppExit () this should terminate the program.arrow_forward****C++ Assume a classed named BankXA that contains info about a customer's transaction. The class has 4 public attributes:string acctOwner //The name of the account's ownerstring xaDetail //some detail on the transactionstring type // assume the value will always be either "dep" for a deposit or "withd" for withdrawal, no other values double amt //the amount of the transaction. The amount will always be 0 or more Note that these attributes are public therefore you will NOT need setters and getters for this exercise. Your program will obtain a pointer to a list of BankXA. Your program must iterate the list using an iterator and the result must be like the following: J. Faune withdrew -$485.00 I. Boesky withdrew -$42885.50 J. Faune deposited +$2.50 Where J. Faune and I. Boesky are the acctOwners,the withdrew and deposited refer to the type "dep" for a deposit or "withd" for withdrawalthe - and + symbols must be added depending on the typeyou must manually add the $ in the outputthe…arrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning