Calculates the area of either Triangle or Rectangle

Assignment Help Basic Computer Science
Reference no: EM133193742

Question 1

 Write a java program which calculates the area of either a Triangle or a Rectangle. Use Scanner to take an input field to tell you if the area to be calculated is for a Triangle or is for a Rectangle. Depending on that input - the program must call either the Triangle method or the Rectangle method. Each of those methods must receive 2 input fields from the user - one for base and one for height in order to calculate the area and then to print that area and the height and base from inside the method.

Question 2.

Write a java program making use of methods that finds the smallest of any three numbers that the user inputs. You must use JoptionPane to input the three numbers. A first method must be called and used to develop logic to find the smallest of the three numbers. A second method must be used to print out that smallest number found.

Question 3.

Write a java program which uses methods for calculating the sum of any 5 nonzero integer digits that are input. The program must use scanner for input of the 5 digits. Two Methods must be used, one for calculating the sum of the 5 digits & the other for printing the sum of the digits. [remember a digit is a single character 1 thru 9]

Question 4.

Write a java program to calculate employee pay using methods. There must be an overtime pay method and a straight pay method and a print method. Using either scanner or JoptionPane, input the employee number, the hours worked, and the hourly pay for an employee. If the employee worked over 40 hours, call the overtime method, if not call the straight time method. Calculate the pay amount in one of the 2 methods. Call a third method to print the employee number and the pay amount.

Reference no: EM133193742

Questions Cloud

Emotional intelligence and leadership development : University of cumberlands-Elliptic Curve requires these parameters (P, a, b, G, n, h). Can you explain what each parameter is?
Define each primary component of information system : Northern Virginia Community College-Of the five primary components of an information system. Define each primary component of the information system.
Computer science-architecture-about the numbering systems : Monroe College-Discuss why it is important in computer architecture field to learn about the numbering systems.
Python program-Calculate amount due from tables : SUNY at Buffalo-Write a Python program that will calculate amount due from tables at a restaurant.
Calculates the area of either Triangle or Rectangle : Write a java program which calculates the area of either a Triangle or a Rectangle. Write a java program to calculate employee pay using methods.
Operationalizing Big Data Analytics project : University of the Cumberlands-As part of the operationalizing a Big Data Analytics project,
Write a Python program : University of the Cumberlands-Write a Python (or R) program.Determines if X is prime or not, If X is not prime, compute and print the factors of that integer X.
European Journal of Information Systems : University of Campbellsille-Discussion of 20 research articles from European Journal of Information Systems and MIS Quarterly that support importance of topic
Research of cryptography history : You are gathering preliminary research of cryptography history to use with a dissertation,

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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