GENERAL INSTRUCTIONS
Comments about flowcharts
PROGRAM #1
Plan, write and execute a program that will have the user enter the tire pressure for all the tires on their vehicle. Your program will average the tire pressures and output the average pressure. You will need to do some research regarding the units that are typically used for tire pressure and be sure to instruct the user to enter a number with the appropriate units. Use formatted output. Report the average pressure to one decimal place. Have the command prompt show two lines below your output. Your output may look something like this (note: the units shown in the example are nonsense units. You should do some research to know what the correct units should be.)
The average tire pressure is 245.5 bubbles.
>>
PROGRAM #2
Plan and write an Octave program that will have the user enter the coordinates of two points that are on a line. Your program needs to determine the equation of the line. Display for the user the equation of the line in slope-intercept form.
Your two points (3,15) and (6,-9) form a line.
The equation of your line is: y = -3.000x + 9.000
The slope and the y-intercept should be displayed in the equation to three decimal places. You can assume that the user will not enter two points that make a vertical line. Your program should handle all other possible lines.
Do your flowcharts…
Do your programs have…
Did you…
Code for question 1:
import java.util.*;
class Main {
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter the no. of tyres");
int noOfTyres=sc.nextInt();
double[] pressure=new double[20];
double press=0;
for(int i=0;i<noOfTyres;i++)
{
System.out.println("Enter the pressure of tier "+(i+1)+" in kPa");
pressure[i]=sc.nextDouble();
press=press+pressure[i];
}
double Avgpressure=press/noOfTyres;
System.out.format("The average tyre pressure is %.1f kPa",Avgpressure);
}
}
The code Snippet and output :
GENERAL INSTRUCTIONS All requirements specified on page 64-67 of the course packet “2.5 Programming Assignment...
Update the program in the bottom using C++ to fit the requirements specified in the assignment. Description For this assignment, you will be writing a single program that enters a loop in which each iteration prompts the user for two, single-line inputs. If the text of either one of the inputs is “quit”, the program should immediately exit. If “quit” is not found, each of these lines of input will be treated as a command line to be executed. These...
This is a computer programming assignment to be done in C++ format. This assignment is based on computer language. If you upload screenshots i would be thankful. Assignment Write a program that will determine the resultant of three forces. The program must . Prompt for the units Prompt for the magnitude and direction of each force Output the resultant magnitude, direction and correct units. Bonus: the program should ask the user if they want to run the program again. The...
employees.txt Instructions You will be using Eclipse for all assignments in this course. You can download Eclipse from the Virtual Desktop. Please write a Java program that follows the instructions below. There are two files to download. AvaCam Inc. is interested in the electronic computation of their payroll. They have reached out, and you have agreed to write a program to help them. They have sent you the file employees.txt (right-click to download the file). Store this file in the...
Assignment W3-2 This programming assignment addresses: •Compiling and Executing an App with more than 1 class •Initializing Objects using Constructors •Software Engineering with Private Instances Variables and Public Set/Get Methods •Uses Methods inside classes Description: You are asked to write a program to process two students’ scores. Each student will have scores for 3 tests, the user will input each student’s full name followed by their three scores. When the data for the two students are read from the keyboard,...
C++ Programming Objects Problem Assignment: Programming challenge #1 on page 714: "File Head Program" Write a program that asks the user for the name of a file. The program should display the first ten lines of the file on the screen (the “head" of the file). If the file has fewer than ten lines, the entire file should be displayed, with a message indicating the entire file has been displayed. Lab Help: Use the following two files to test your...
The program will need to accept two input arguments: the path of the input file and the path of the output file. See etc/cpp/example.ifstream.cpp for the basis of how to do this. Once the input and output file paths have been received, the program will need to open the input and output files, read and process each input file line and create a corresponding output file line, close the input and output files, and then create and output some summary...
PYTHON PROGRAMMING Instructions: You are responsible for writing a program that allows a user to do one of five things at a time: 1. Add students to database. • There should be no duplicate students. If student already exists, do not add the data again; print a message informing student already exists in database. • Enter name, age, and address. 2. Search for students in the database by name. • User enters student name to search • Show student name,...
my question is on a java program. i have added all instructions for this homeowrk assignment. from how the input is entered and what the output should read. im seeing if i can get a psuedo code setup for how the algorithm should be setup. Build an Intersection Check program. User inputs two points as x-y coordinates in twodimension space. Two points represent two end points of a line segment. Then, user can input second two points for the second...
I need that in Java CSCI 24000- Fall 2017 Assignment #3-Class-v Players Due: 10/9/2017 This third assignment will allow you to explore (by comparing and contrasting through construction and implementation) two different object-oncnted programman罨languages (C++ and Javal You will be creating tme scparate programs-onc written in C++ and on written in Java For this assignment, we are going to explore how we can use objects to build more expressive and cleaner programs. In honor of football season we are going...
Create the network specified in the assignment. NOTE: THIS IS NOT A DIAGRAM OF YOUR PERSONAL HOME NETWORK! Start with a house. You'll need to enlarge the house (you will learn how to do this by reading the software's help topics or by experimentation) to be able to put all "inside" devices inside the house graphic. You may substitute a large rectangle to represent the house -- and place all "inside" devices inside the rectangle. This house must be labeled...