A+ answers | Computer Science homework help

This part comprises ten questions. Each question is worth 10 marks. All questions in part 1 will need to be completed.

when solving the problems in this section, you must follow the application programming interface (API) expected in each problem. You should implement all the attributes and operations mentioned in the API.

Note that there is no main method in the APIs. That is, you should not perform any data processing within the main method. You should rather use the main method to test other methods, prompt the user for some inputs, and display the results returned by your methods.

 

Create a class named AddressBook that has the following field names:

firstName, middleName, lastName, homeAddress, businessPhone, homePhone, cellphone, skypeId, facebookId, and personalWebSite.

Use appropriate data types to store the values for these fields in AddressBook objects.

Create appropriate get and set methods to retrieve and assign values to these names. For example, getMiddleName(viveAddressBook) should return the middle name of the person Vive. Similarly, vive.setPersonalWebsite(url) should set the personal website of the person Vive to the specified URL object.

Using the get and set methods, create a comparison method compareNames(name1, name2) that compares the first, middle, and last names of strings name1 and name2. Assume that name1 and name2 follow the following format: “FirstName M. LastName”.

Test your program for correct, partially correct (e.g., name string without the middleName), and incorrect inputs (e.g., phone number containing special characters).

A group of AU friends decide to run the Banff, Alberta, Marathon. Their names, times (marathon completion time in minutes), and number of years participated are given below:

1

Elena Brandon

341

1

2

Thomas Molson

273

2

3

Hamilton Winn

278

5

4

Suzie Sarandin

329

7

5

Philip Winne

445

9

6

Alex Trebok

275

3

7

Emma Pivoto

275

4

8

John Lenthen

243

1

9

James Lean

334

1

10

Jane Ostin

412

1

11

Emily Car

393

4

12

Daniel Hamshire

299

4

13

Neda Bazdar

343

3

14

Aaron Smith

317

6

15

Kate Hen

265

8

 

Extend the AddressBook class from Problem 1 to store the additional data. Now, write a method to find the fastest runner. Print the name, address, and his/her time (in minutes) on three separate lines.

Find the second fastest runner. Print the name, address, his/her time (in minutes), and the difference in time with the fastest runner.

Compute the average time of completion taken by these runners.

 Finally, print the name and number of years participated for each runner if the runner’s time of completion is equal to or better than the average time of completion.

Solve the following problem using a program:  Suppose you save $100 each month into a savings account with an annual interest rate of 5%. Thus, the monthly interest rate is 0.05/12 = 0.00417.

Write a program that randomly generates monthly savings amounts for the 15 runners in Problem 4. Each monthly saving should be in the range of $100 to $800. Extend the AddressBook class to store the monthly savings generated by the random number generator.

Then, display the final account value for each of the 15 runners.

 

 

Google Inc. is looking to recruit three of the Boston runners. The criteria for selection are as follows:

Average final marks in bachelor’s degree (store up to 2 decimal places). The fifteen candidates have the following grades: 82.30%, 85.10%, 77.77%, 69.93%, 93.03%, 88.61%, 55.99%, 87.49%, 88.00%, 91.20%, 66.79%, 76.65%, 55.89%, 90.01%, and 87.9%.

Ability to communicate as one of the three values – “excellent”, “average”, and “poor”.  The fifteen candidates have the following ability to communicate, respectively: poor, poor, average, average, average, poor, excellent, excellent, excellent, average, excellent, average, excellent, excellent, poor.

Innovation as one of the two values – “brilliant” and “average” (store as a Boolean; brilliant = true and average = false).  The fifteen candidates have the following innovative abilities: brilliant, average, average, average, brilliant, brilliant, average, brilliant, average, brilliant, average, brilliant, brilliant, average, average.

Ability to regulate one’s own skill as a probability value between 0 and 1.0 – 1.0 implies excellent regulatory capabilities and 0.0 implies no skills to regulate (store as a double).  The fifteen candidates have the following regulatory abilities: 0.5, 1.0, 0.8, 0.0, 1.0, 0.7, 0.8, 0,9, 0.5, 0.6, 0.3, 0.2,  0.5, 0.3, 0.8.

Store these values for the fifteen candidates in an extended AddressBook class. In general, Google will not consider a candidate with average marks of less than 85%. Google will consider a candidate with average marks of less than 85% only if the candidate at least has 0.5 regulatory abilities and at least ‘average’ ability to communicate.  Google will only consider a candidate with poor communication ability if the candidate has a ‘brilliant’ innovation capability. Write a program that will help Google to programmatically determine eligibility of the fifteen candidates for these positions, and print the output on the console.

 

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more