Design a program to compute the distance between 2 points

Assignment Help Programming Languages
Reference no: EM132365385

Program 1: I'm buyin' a Ferrari! If you've ever travelled to another country, you know that working with different currencies takes a while to get used to. As of the date of making this assignment, there are 9,240.00 Guinean Francs to $1 USD. For this program, design (pseudocode) and implement (source code) a program that prompts the user for the amount of U.S. currency they have, and converts it into Ginean Francs.

Document your code and properly label the input prompts and the outputs as shown below.

Sample run 1:

Enter an amount in USD: $50
You have 462000.0 Guinean Francs Sample run 2:
Enter an amount in USD: $313
You have 2892120.0 Guinean Francs

Program 2: All Hail Modulus Agustus! The modulus operator is used all the time. Realize that if you "mod" any number by a number "n", you'll get back a number between 0 and n-1. For example, "modding" any number by 20 will always give you a number between 0-19. Your job is to design (pseudocode) and implement (source code) a program to sum the total of all digits in an input integer number between 0 and 1000, inclusive. Notice that you need to extract individual digits from the input number using the remainder (modulus) and division mathematical operators.
For example, if the input number is 123, the sum of its digits is 6. Document your code and properly label the input prompts and the outputs as shown below.

Sample run 1:

Entered number: 123 Sum of digits: 6

Sample run 2:

Entered number: 588 Sum of digits: 21

Sample run 3:

Entered number: 100 Sum of digits: 1

Program 3: Distance calc. This question is fairly straightforward. Design (pseudocode) and implement (source code) a program to compute the distance between 2 points. The program prompts the user to enter 2 points (X1, Y1) and (X2, Y2). The distance between 2 points formula is:

Square_Root [(X2 - X1)^2 + (Y2 - Y1)^2]

Document your code, properly label the input prompts, and organize the outputs as shown in the following sample runs. Note: for C++, #include <math.h> and then call sqrt(). For Java, you'll use Math.sqrt() and for C# it's Math.Sqrt(). See the short appendix below for the general form.
Sample run 1: Entered X1: 1.5
Entered Y1: -3.4
Entered X2: 4
Entered Y2: 5
Distance: 8.764131445842194
Sample run 2: Entered X1: -5.5
Entered Y1: -8.8
Entered X2: 25
Entered Y2: 4.5
Distance: 33.27371334852784
Sample run 3: Entered X1: 2
Entered Y1: 2
Entered X2: 10
Entered Y2: 10
Distance: 11.313708498984761

Program 4: Is there a Prius version? Did you know that the average Boeing 747 airplane uses approximately 1 gallon of fuel per second? Given the speed of the airplane, that means it gets 5 gallons to the mile. No, not 5 miles to the gallon, 5 gallons to the mile. You may be questioning why such a horribly inefficient machine is allowed to exist, but you'll be happy to find out that, because this airplane hold 568 people, it averages about 0.01 gallons per person - (100 miles per gallon per person).

Your job is to design (pseudocode) and implement (source code) a program that asks the user for a distance the plane has to fly (i.e. the length of the trip) and also asks the cost of jet fuel (which is currently $1.80 per gallon). The program should then calculate the total fuel charges to make the trip. Next, ask the user how many people will fly, as well as the average cost of a ticket. Finally, print the total profit made (or lost) and the average gas mileage per person. Document your code and properly label the input prompts and the outputs as shown below.

Sample run 1:

Enter the flight distance: 1000
Enter the current cost of jet fuel: $2 The flight will cost $10000.0 in fuel. Enter the number of passengers: 5
Enter the average cost of a ticket: 1000 You will make a profit of $-5000.0
You averaged 1.0 miles per person per gallon! Sample run 2:

Enter the flight distance: 500
Enter the current cost of jet fuel: $3 The flight will cost $7500.0 in fuel. Enter the number of passengers: 500 Enter the average cost of a ticket: 300 You will make a profit of $142500.0
You averaged 100.0 miles per person per gallon!

Sample run 3:

Enter the flight distance: 4200
Enter the current cost of jet fuel: $1.80 The flight will cost $37800.0 in fuel.
Enter the number of passengers: 550 Enter the average cost of a ticket: 600 You will make a profit of $292200.0
You averaged 110.0 miles per person per gallon!

Note: Need this assignment in C# language

Attachment:- Type Systems and Expressions.rar

Reference no: EM132365385

Questions Cloud

Review the concepts of technology application : Review the concepts of technology application as presented in the Resources. Reflect on how emerging technologies such as artificial intelligence may help.
Benefits and disadvantages of free international trade : What are the benefits and disadvantages of free international trade for the United States? Illustrate your answer with examples.
Define what an information silo is : A company called Colony Nursery and Landscaping opened a new store located a few hundred miles away from its original location. The company wants to implement.
Explain how the medicaid program works : Answer the following questions related to the website. Explain how the Medicaid program works. Describe how the Medicaid program is financed.
Design a program to compute the distance between 2 points : CSE 1321L - Programming and Problem Solving - Kennesaw State University - Type Systems and Expressions - design (pseudocode) and implement (source code)
How do you see current trends and change in healthcare model : How do you see current trends and changes in healthcare models impacting the delivery of healthcare? Consider the impact of these trends on your own practice.
Creating an animation called Lane Crossing : Computer Programming Java Assignment - Lane Crossing - In this assignment we will begin creating an animation called "Lane Crossing"
About data encryption as method of protecting data : Which one of the following statements is most correct about data encryption as a method of protecting data?
What concerns physicians have to become part of its panel : An MCO is trying to determine what concerns physicians have in agreeing to become part of its panel of physicians who will treat its subscribers.

Reviews

len2365385

9/3/2019 10:31:32 PM

Part 1: Pseudocode: 1. Review the assignment submission requirements and grading guidelines. 2. Upload the pseudocode files (Word doc or PDF) to the assignment submission folder in Gradescope. 3. The files must be uploaded to Gradescope by the due date. The Pseudocode must be complete and following the standards listed at https://ccse.kennesaw.edu/fye/ Part 2: Source Code: 1. Review the assignment submission requirements and grading guidelines. 2. Upload the source code files to the assignment submission folder in Gradescope. 3. The files must be uploaded to Gradescope by the due date. Short Appendix: So you want to find the sqrt of a number? Here’s the general form: int number = 100; float result = sqrt (number); // result now has the value 10. Realize that “sqrt()” above could be Math.sqrt() for Java or Math.Sqrt() for C#.

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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