Write appropriate setter and getter method to set and access

Assignment Help Computer Engineering
Reference no: EM131911159

Assignment

Objective: The goal of this assignment is to practice linked lists.

Background: Suppose that you like traveling and you are planning on visiting your friends who live in different towns of Texas during Spring Break. Use a linked list to plan and organize the sequence of your visits to your friends.

Task: Write a class named Friend. The Friend class must contain the following three private data fields.

the name of the friend,
city name where your friend lives,
price/budget of the gift you are planning to purchase for this friend.

Note that you will need an additional reference field to link to the next Friend of the list. This reference field can be public. Write appropriate setter and getter methods to set and access all the private fields.

Write a different class named Organizer to maintain a linked list containing Friend elements.

Write methods within the Organizer class:

for starting a linked list with the first person,
for inserting a new friend to the list,
for deleting a friend from the list,
for searching whether a given friend is on your list,
for printing the entire list of friends you are planning to visit, and
for computing the total amount of money you are planning to spend to buy gift items for your friends.

In the main method of the Organizer class, test your methods by filling in information about at least five different friends to visit, and by printing the resulting list. Also, display the total amount of money you are planning to spend on gifts. To test insertion and deletion, add one of your friends who is not already in the list, and show that you can search for this friend. Delete a friend from the list to demonstrate that your delete method works perfectly.

Reference no: EM131911159

Questions Cloud

Show a grid of all homework and scores of all students : Show a grid of all homework and scores of all students. Show a grid of all exams and scores of all students. Project, includes title, due date, average score.
What is the amount of total costs allowed : What is the amount of total costs allowed if the 20% normal profit target is desired at the 500 sales target? Show amount for fixed and variable costs
Prepare a short description of the health issue covered : Prepare a short description of the health issue covered in the YouTube video. Be sure to include the location and population affected.
Calculate the gross profit of widget distributors : AFE3691 - FINANCIAL ACCOUNTING 1A - Prepare the statement of profit or loss & other comprehensive income for Amigo CC for the year ended 30 June 20x2
Write appropriate setter and getter method to set and access : The goal of this assignment is to practice linked lists. Write appropriate setter and getter methods to set and access all the private fields.
Prepare income statements for both years using absorption : As the lots are sold, they are cleared at an average cost of $5,000. Prepare income statements for both years using both absorption and variable costing methods
What is the? bond coupon? rate : Suppose a? five-year, $ 1 000 bond with annual coupons has a price of $ 903.57 and a yield to maturity of 6.1 %. What is the? bond's coupon? rate?
Examine the role of the institutional animal care : Examine the role of the Institutional Animal Care and Use Committee in protecting animals in research and the Institutional Review Board.
Calculate the overhead assigned to each product : Total estimated overhead costs are $503,250, of which $224,400 is assigned to the material handling cost pool, Calculate the overhead assigned to each product

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd