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 the account. Each account has an interest rate.
Assume 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 13 Solutions
Starting Out with C++ from Control Structures to Objects (8th Edition)
Additional Engineering Textbook Solutions
Database Concepts (8th Edition)
Problem Solving with C++ (10th Edition)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Absolute Java (6th Edition)
Starting Out with Python (4th Edition)
- Book 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_forwardC# programming question. This task will be a car dealership where you’ll help the user find the car(s) they want. This program should keep going until the user either decides to not continue with the purchase, or the purchase is complete, and no more order is being processed. You will need 3 structs to store: • client information • order information • used_car information Each struct would have the following fields: struct used_car { int carID; char brand[length]; char make[length]; int year; int mileage; float price; }; struct order { int numCosigned; int carID; float pricePerPerson; }; struct client { char firstName[length]; char lastName[length]; bool isEmployed; int creditScore; }; I. global variables: • Create an array of struct used_car and add some cars in there. I put 4 cars. You can do as many as you want (at least 3). • Make sure to put the struct definition above the array creation, otherwise, it won’t work. o This is similar to you trying to call a function X that’s not…arrow_forwardClass 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_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_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_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_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_forwardIn C++ Programming this assignment, you are required to create a class called Circle. The class must have a data field called radius that represents the radius of the circle. The class must have the following functions: (1) Two constructors: one without parameters and another one with one parameter. Each of the two constructors must initialize the radius (choose your own values). (2) Set and get functions for the radius data field. The purpose of these functions is to allow indirect access to the radius data field (3) A function that calculates the area of the circle (4) A function that prints the area of the circle Test your code as follows: (1) Create two Circle objects: one is initialized by the first constructor, and the other is initialized by the second constructor. (2) Calculate the areas of the two circles and displays them on the screen (3) Use the set functions to change the radius values for the two circles. Then, use get functions to display the new values in your main…arrow_forward
- Create 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_forwardAge calculation. You must use the object oriented programming for this problem. USE JAVA LANGUAGE (1) Create a class called Date that Includes three pieces of information as data members—a month (type int), a day (type int) and a year (type int). Have a constructor with three parameters to initialize the three data members. Call setters inside to initialize each attribute. Provide a set and a get method for each data member. Assume that the values provided for the year and day are correct, but ensure that the month value is in the range 1–12; if it isn’t, set the month to 1. Provide a member function displayDate that displays the month, day and year separated by forward slashes (/). Provide a member function called calculateAge with three parameters that indicate a future date (represented as month, date, and year). Calculate one’s age based on one’s birth date and this future date. Inside the method simply print out one’s age in the format of how many years and how many days. Note…arrow_forwardC# When the program is running, it can use the class to create as many objects of a specific type as needed. Each object that is created from a class is called a(n) __ of the class. Question 1 options: event instance namespace memberarrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT