CS101 – 955 Assignment 6

Amani Ahmad 23 160 60
Banan Mohammad 17 175 80
Deema Hamad 34 155 57
Fai Omar 45 158 69

 

Write a Java program that asks the user to enter the information shown above. The columns are as follows: first name, last name, age, height in cm, and weight. Then, do the following:

Don't use plagiarized sources. Get Your Custom Essay on
CS101 – 955 Assignment 6
Just from $13/Page
Order Essay
  1. Using the height and weight, calculate the BMI for each person.

 

BMI = weight / (height in meters)^2

 

  1. Obtain each person’s initials. The initials are the first letter of the first name and the first letter of the last name. For example, if your name Alia Mohammad, then your initials are Hint: use charAt.

Your program will generally look as follows:

  • Prompt the user to enter the information in the first table. For instance:

 

Please enter each person’s information separated by space:

Amani Ahmad 23 160 60

Bader Mohammad 17 175 80

 

  • Use 5 arrays to store the information entered by the user: firstNameArray, lastNameArray, ageArray, heightArray, weightArray. They are all of size 4.

 

  • Declare two new arrays bmiArray and initialsArray

 

  • Using a loop, calculate the bmi for each person and get the initials and store them in the corresponding element. For example,

 

bmiArray[i] = weightArray[i] / Math.pow(heightArray[i]/100.0, 2);

 

  • Finally, save all the information in a new file as shown below:
First Name Last Name Age Height Weight BMI Initials
Amani Ahmad 23 160 60    
Bader Mohammad 17 175 80    
Deema Hamad 34 155 57    
Eyad Omar 45 158 69    

 

The Homework Labs
Calculate your paper price
Pages (550 words)
Approximate price: -

Our Advantages

Plagiarism Free Papers

We ensure that all our papers are written from scratch. We deliver original plagiarism-free work. To guarantee this, we submit all work alongside a plagiarism report.

Free Revisions

All our papers are completed and submitted before the deadline. We ensure this to provide you with enough time to go through the work and point out any sections or topics that may need revision or polishing. We provide unlimited revision services for free.

Title-page

All papers have a title page providing your personal and institutional information. We do not charge you for this title page.

Bibliography

All papers have a bibliography or references page. This page is a requirement for academic and professional documents. We provide this page at no cost for all our papers.

Originality & Security

At Thehomeworklabs, we guarantee the confidentiality and security of your information. We value our clients and take confidentiality seriously. All personal information is treated with confidentiality and stored safely to ensure that no third parties gain access to it. We also provide original work and attach an originality/plagiarism report alongside all papers.

24/7 Customer Support

Our customer support team is available 24/7 to provide you with any necessary assistance when you need it. You can contact us at any time, day or night, via email or through the live chat button.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

We provide our customers with the best experience in the academic and business writing field.

Pricing

Flexible Pricing

We provide the best quality of service at affordable prices. We also allow our clients to make partial payments for their orders. You can also contact our customer support team in case you need to discuss a different payment plan.

Communication

Admission help & Client-Writer Contact

We realize that sometimes clarification is necessary to ensure that quality work is done. Therefore, we provide a button for clients and writers to communicate in case some clarification is needed.

Deadlines

Paper Submission

We ensure that we submit all papers ahead of their respective deadlines. This allows you to go through the documents and request any revision, corrections, or polishing before the paper is due.

Reviews

Customer Feedback

We encourage customer feedback, positive or negative. We can identify the various areas that we need to improve to provide even better services through your feedback. Please feel free to give us feedback.