Additional details for methods in each class: You are required to implement the following method in...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Additional details for methods in each class: You are required to implement the following method in each class, following its respective description Person Class Appropriate getter and setter methods. toString(): Override this method to provide a meaningful string representation of the object. Martyr Class Appropriate getter and setter methods. toString(): Override this method to provide a meaningful string representation of the object. Live Person Class: toString(): Override this method to provide a meaningful string representation of the object. Family Class: addMember(Person member, String roleInFamily): Adds a person to the family with a specified role (The permitted roles include mom, dad, son, and daughter). removeMember(Person member): Removes a person from the family. getMembers(): Retrieves the list of family members. getFamilyName(): Retrieves the Family Name. setFamilyName(String familyName): set a name for family. addParent(Person parent): Adds a parent to the family. removeParent (Person parent): Removes a parent from the family. getParents(): Retrieves the list of family parents. toString(): Override this method to provide a meaningful string representation of the object. equals(Object obj): Override this method to consider two families as equal if they have the same number of martyrs. Manager Class: addFamily (Family family): Adds a new family to the system. updateFamily (String familyName, Family updatedFamily): Updates information about a family based on Family name. deleteFamily (String familyName): Deletes a family from the system based on Family name. searchByName(String familyName): Searches for a family based on Family name. searchPersonByID(String personID): Searches for a person based on their ID. calculate TotalMartyrs(): Returns the total number of martyrs in the system. calculate TotalOrphans(): Returns the total number of orphans in the system. Orphans are individuals whose parents (both mom and dad) have passed away. calculate TotalLive Persons(): Returns the total number of live persons in the system. calculate Family Statistics(String familyName): Returns statistics for a specific family, including the number of martyrs, orphans, and live persons. Store the returned values in ArrayList. calculate GlobalStatistics(): Returns overall statistics for the system. Store the returned values in ArrayList. toString(): Override this method to provide a meaningful string representation of the object. Page3 Additional details for methods in each class: You are required to implement the following method in each class, following its respective description Person Class Appropriate getter and setter methods. toString(): Override this method to provide a meaningful string representation of the object. Martyr Class Appropriate getter and setter methods. toString(): Override this method to provide a meaningful string representation of the object. Live Person Class: toString(): Override this method to provide a meaningful string representation of the object. Family Class: addMember(Person member, String roleInFamily): Adds a person to the family with a specified role (The permitted roles include mom, dad, son, and daughter). removeMember(Person member): Removes a person from the family. getMembers(): Retrieves the list of family members. getFamilyName(): Retrieves the Family Name. setFamilyName(String familyName): set a name for family. addParent(Person parent): Adds a parent to the family. removeParent (Person parent): Removes a parent from the family. getParents(): Retrieves the list of family parents. toString(): Override this method to provide a meaningful string representation of the object. equals(Object obj): Override this method to consider two families as equal if they have the same number of martyrs. Manager Class: addFamily (Family family): Adds a new family to the system. updateFamily (String familyName, Family updatedFamily): Updates information about a family based on Family name. deleteFamily (String familyName): Deletes a family from the system based on Family name. searchByName(String familyName): Searches for a family based on Family name. searchPersonByID(String personID): Searches for a person based on their ID. calculate TotalMartyrs(): Returns the total number of martyrs in the system. calculate TotalOrphans(): Returns the total number of orphans in the system. Orphans are individuals whose parents (both mom and dad) have passed away. calculate TotalLive Persons(): Returns the total number of live persons in the system. calculate Family Statistics(String familyName): Returns statistics for a specific family, including the number of martyrs, orphans, and live persons. Store the returned values in ArrayList. calculate GlobalStatistics(): Returns overall statistics for the system. Store the returned values in ArrayList. toString(): Override this method to provide a meaningful string representation of the object. Page3
Expert Answer:
Answer rating: 100% (QA)
In the Person class you need to implement getter and setter methods for the class attributes The toString method should be overridden to provide a mea... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
What is Modern Monetary Theory? Give one argument that suggests it should be followed and one argument that suggests it should not be followed. Should this theory be used as policy?
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
In Exercises 7683, use a graphing utility to graph the function. Use the graph to determine whether the function has an inverse that is a function (that is, whether the function is one-to-one). f(x)...
-
For each of the following pairs of vectors x and y, find the vector projection p of x onto y and verify that p and x - p are orthogonal. (a) x = (3,5)T. y = (l, l)T (b) x = (2, -5,4)T, y = (1,2.-l)T
-
If a sum due in 6 months , what is the interest rate equivalent to a discount rate of 14% ?
-
Symbol B could represent (a) computation of net pay. (b) separation of erroneous time cards. (c) validation of payroll data. (d) preparation of the payroll register.
-
The Sayers Company purchased a building for $250,000 on January 2, 2007. The building has an expected residual value of $20,000 at the end of its expected life of 20 years. Required Prepare a...
-
. The degree of newness of a new product can be on a continuum ranging from slightly repositioned to new - to - the - world. Where would you put Famosos innovations on this continuum? Why?
-
Below is the taxpayer information for Sharon and Robert Dolan. They have two children who lived with them, David ( SS# 1 5 4 - 1 3 - 5 8 2 6 ) , age 1 3 ( date of birth: October 1 1 , 2 0 1 0 ) ,...
-
On 31/6/2016, DH Ltd acquired 80% of the shares in CH Ltd. On that date, the equity of LH Ltd comprised: $'000 Share capital 700 Retained earnings 400 Equity 1,100 At acquisition, the book value of...
-
1.Discuss the current issues of equal pay for work of equal value and pay compression. Cite examples as discussed in the class lecture and text readings. 2.Discuss the key reasons why employees form...
-
Discuss the impacts and implications of COVID-19 pandemic on the financial markets in Malaysia. Overall of financial market)
-
Consider the following two mutually exclusive projects: Year Cash Flow (X) Cash Flow (Y) 0 -$23,000 -$23,000 1 10,490 12,000 2 10,900 9360 3 10,500 10,400 Calculate the IRR for each project: Project...
-
What is the definition of systematic risk and nonsystematic risk? What are the differences when considering risk management ? How can current news help demonstrate each type of risk
-
In 2020, Peter, Fred and Wendy) set up Runner Ltd, to manufacture and supply clothing. They are the only Directors and each holds 20% of the shares in the Company. The rest of the shares are held by...
-
The elevation of city A is 80 feet below sea level; the elevation of city B is 16 feet above sea level. Part A: Express the elevation of the two cities using integers. Part B: Write a number sentence...
-
Suppose the S&P 500 futures price is 1000, = 30%, r = 5%, = 5%, T = 1, and n = 3. a. What are the prices of European calls and puts for K = $1000? Why do you find the prices to be equal? b. What...
-
Janie graduates from high school in 2012 and enrolls in college in the fall. Her parents pay $4,000 for her tuition and fees. a. Assuming Janie's parents have AGI of $170,000, what is the American...
-
In the 2012 tax year, Michelle paid the following amounts relating to her 2010 tax return: Tax deficiency..........................................$5,000 Negligence...
-
Sherry Hopson owns a retail family clothing store. Her store is located at 4321 Circle Drive, Houston, TX 77001. Her employer identification number is 95- 1234321 and her Social Security number is...
-
Equipment costing \($640,000\), with an expected useful life of twelve years and an expected salvage value of \($20,000\), was purchased at the beginning of the year. Calculate the depreciation...
-
Swift Trucking Company purchased a long-haul tractortrailer for \($400,000\) at the beginning of the year. The expected useful life of the tractor-trailer rig was eight years or 500,000 miles....
-
The following are financial data taken from the 2015 annual report of Pfizer, Inc: Calculate the following ratios for 2015 and 2014: intangible asset turnover, fixed asset turnover, accumulated...
Study smarter with the SolutionInn App