Question
need help







Question 5 (1 point) Exploration - You have been tasked by NASA (National Aeronautics and Space Administration) with helping

need it in psuedocode
0 0
Add a comment Improve this question Transcribed image text
Answer #1

NOTE: I have given the function in java and CPP language.

JAVA Function :

// required function

public void print()

{

// printing distance and fuel

System.out.println("Current Destination: "+Distance);

System.out.println("Current fuel: "+Fuel);

}

Sample program:

class Main { // required function public static void print() { int Distance = 1000; int Fuel = 50; Il printing distance and f

Output:

Current Destination: 1000 Current fuel: 50

--------------------------------------------------------------------------------------------------------------------------------

CPP function:

void print(){

int Distance = 1000;

int Fuel = 30;

cout<<"Distance is :"<<Distance<<endl;

cout<<"Fuel is :"<<Fuel<<endl;

}

Sample program:

#include <iostream> using namespace std; void print() { int Distance 1000; int Fuel = 30; cout<<Distance is :<<Distance<<en

CODE TO COPY:

#include <iostream>

using namespace std;

void print(){

int Distance = 1000;

int Fuel = 30;

cout<<"Distance is :"<<Distance<<endl;

cout<<"Fuel is :"<<Fuel<<endl;

}

int main() {

print();

}

Add a comment
Know the answer?
Add Answer to:
need help need it in psuedocode Question 5 (1 point) Exploration - You have been tasked...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Need a Java program, great if anyone is able to help You have been asked to...

    Need a Java program, great if anyone is able to help You have been asked to write an analysis of the deer population by town in New Jersey. The accompanying file contains data about each town. The format of the file is the name of the town, square miles and the number of deer counted. You will need to produce the report as follow: Township               Square    Deer                   Deer Per           Deer/Tick        Tick Threat Name                      Miles      Population         Square Mile     Coefficient      Indicator Green...

  • I just need help with the question #5-6 4. As you are an intelligent chemist and...

    I just need help with the question #5-6 4. As you are an intelligent chemist and you've been doing this long enough to understand some fundamental aspects of safety when mixing/cooking chemicals etc., you decide before you begin this process, to place your reactants and the associated glassware under the vacuum hood just to be on the safe side. Based on your chemical equation above, is there a gas emanating from this reaction and if so, what gas is going...

  • Need code written for a java eclipse program that will follow the skeleton code. Exams and...

    Need code written for a java eclipse program that will follow the skeleton code. Exams and assignments are weighted You will design a Java grade calculator for this assignment. A user should be able to calculate her/his letter grade in COMS/MIS 207 by inputting their scores obtained on worksheets, assignments and exams into the program. A skeleton code named GradeCompute.java containing the main method and stubs for a few other methods, is provided to you. You must not modify/make changes...

  • I need help for part B and C 1) Create a new project in NetBeans called...

    I need help for part B and C 1) Create a new project in NetBeans called Lab6Inheritance. Add a new Java class to the project called Person. 2) The UML class diagram for Person is as follows: Person - name: String - id: int + Person( String name, int id) + getName(): String + getido: int + display(): void 3) Add fields to Person class. 4) Add the constructor and the getters to person class. 5) Add the display() method,...

  • In Java Burdell and the Buzz Problem Description As an aspiring band manager, you need to...

    In Java Burdell and the Buzz Problem Description As an aspiring band manager, you need to promote your band and expand publicity. Being hip with the times, you know that social media can make or break a band’s popularity. So, you decide to bring some ‘lucky’ Georgia Tech students to spread the good word! Solution Description Write the Concert, Musician, and Fan classes to guide your band on their rock star journey. You will design these classes from scratch following...

  • 1 Overview The goal of this assignment is to help you understand caches better. You are...

    1 Overview The goal of this assignment is to help you understand caches better. You are required to write a cache simulator using the C programming language. The programs have to run on iLab machines. We are providing real program memory traces as input to your cache simulator. The format and structure of the memory traces are described below. We will not give you improperly formatted files. You can assume all your input files will be in proper format as...

  • For this lab you will write a Java program that plays the dice game High-Low. In...

    For this lab you will write a Java program that plays the dice game High-Low. In this game a player places a bet on whether the sum of two dice will come up High (totaling 8 or higher), Low (totaling 6 or less) or Sevens (totaling exactly 7). If the player wins, they receive a payout based on the schedule given in the table below: Choice Payout ------ ------ High 1 x Wager Low 1 x Wager Sevens 4 x...

  • Assignment Overview In Part 1 of this assignment, you will write a main program and several...

    Assignment Overview In Part 1 of this assignment, you will write a main program and several classes to create and print a small database of baseball player data. The assignment has been split into two parts to encourage you to code your program in an incremental fashion, a technique that will be increasingly important as the semester goes on. Purpose This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of...

  • Java Program Note: no break statements or switch staements High, Low, Sevens For this lab you...

    Java Program Note: no break statements or switch staements High, Low, Sevens For this lab you will write a Java program that plays the dice game High-Low. In this game a player places a bet on whether the sum of two dice will come up High (totaling 8 or higher), Low (totaling 6 or less) or Sevens (totaling exactly 7). If the player wins, they receive a payout based on the schedule given in the table below: Choice Payout ------...

  • In Python Question 3 (13 points): Purpose: To practice your ability to modify lists and compute...

    In Python Question 3 (13 points): Purpose: To practice your ability to modify lists and compute with lists of lists Degree of Difficulty: Moderate For this question, you are given some population estimates, by age group, from Statistics Canada for some provinces. Starter File a5q3 starter.py is a file that contains a list of lists, to which the variable Pop-data refers, which represents 2020 population numbers. The first item in Pop_data is a list whose first item is the string...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT