logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Jason RoyComputer science
(5/5)

537 Answers

Hire Me
expert
Jai Parkash KashiAccounting
(5/5)

673 Answers

Hire Me
expert
William BellBusiness
(5/5)

764 Answers

Hire Me
expert
Christopher MclaughlinMathematics
(5/5)

832 Answers

Hire Me
Java Programming

find the maximum and minimum of four numbers. You need to use if then else conditional statement or its short form (example max = (a>b? a: b);) to find these values

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

CPSC 130 (17663, 14154)

Introduction to Computer Programming

MD Minhaz Chowdhury

Programming Assignment 4

Chapter 3

Objective of the Assignment

In this exercise, we will find the maximum and minimum of four numbers. You need to use if then else conditional statement or its short form (example max = (a>b? a: b);) to find these values.

 

Total Score: 20

Tasks

Write a program that finds the maximum and minimum of four numbers. The input numbers can be hard coded or can be given from input (there is no restriction on input read in this problem). Your program shall print the maximum and minimum of these four numbers. You need to use if then else conditional statement to find these values.

Example: if you have numbers -1, 5, 100, 0 then your program’s output shall look like this:

First number: -1

Second number: 5

Third number: 100

Fourth number: 0

Maximum of the numbers: 100

Minimum of the numbers: -1

 

Your Program Must Contain

  1. Print the result as described: score 2
  2. Use of if then else conditional statement: score 10
  3. Comment shall contain your name; you need to add at least few comments of your own: score 2

Total: 14 for the code part.

 

Note: Submission of the assignment using a word or pdf file that follows the given format. If you do not use, follow the given template format then your score will be zero. You must mention your name, course number, course section number (or schedule, example MWF 10 am) in the assignment and any email related to the assignment. If you email does not contain any of the mentioned information, then your email will be considered as not acceptable

 

What to Submit

You must submit a document whose template is given below. Your score can not be confirmed if you just sent screenshots in the email or upload at D2L. You need to put the screenshots and code in the template. In that template put the following items:

  1. Copy and paste your java code at the designated place. Do not put screenshot here, rather copy and paste the code. (Program code section) (score 14).
  2. Output Screenshots: you will put four different input for three different run of your program (total four runs, one input at each run). We will call each of these run a test case. Your given template has “Test Case 1”, “Test Case 2”, “Test Case 3”. Each test case has input and output section. In input section type the input and in the output section copy paste the screenshot of your program (score 2×3 = 6).

Total: 14 + 6 = 20

 

 

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme