Write the definition of a void method

Assignment Help JAVA Programming
Reference no: EM131129971

Q1: Write the definition of a void method that takes as input two parameters of type int, say sum and testScore. The method updates the value of sum by adding the value of testScore. The new value of sum is sent back to the caller statement.

Q2: Write a method, is Vowel, which returns the value true if a given character is a vowel and otherwise returns false.

Q3: Write the definition of a void method that inputs an integer number and output the result as 3 times the value of that number.

Q4: Find the sum of the following series using methods:

(a) 1+1/2+1/3+1/4+1/5

(b) 1-2+5-10+17-26

Q5. Write the definition of a method that takes as input a char value and returns true if the character is uppercase, otherwise, it returns false.

Q6. Create a class that mimics a Bank account. It should have functions to get the account balance, withdraw money, should not allow for overdraft i.e., should check that minimum balance is zero. It should show the account holders name, bank and account details. The main() function should be used to display and check all functions.

Q7. Create a program to mimic a petrol vending machine. It should be able to sell petrol and diesel at Rs 65 per litre and Rs 45 per litre. The program should take as input the total amount of petrol/diesel to be sold and produce a bill with 12% Vat and 6% sales tax.

Q8. Create a program that takes marks in five subjects English, Hindi, Maths, Science, Social Studies as input. It calculates grades and displays it as follows:

  • Marks >= 90 = Grade A+
  • Marks >= 75 = Grade A
  • Marks >= 60 = Grade B
  • Marks >= 50 = Grade C
  • Marks >= 40 = Grade D
  • Marks <40 = Grade D

If the overall marks are less than 200 or grades in 2 or more subjects is F. then the child is held back else he is promoted.

Q9. Write a program in lava to accept two numbers and check whether they are twin prime or not by using the function name prime (). The function returns 1 if the number is prime otherwise returns 0.

Twin Prime numbers are such prime numbers whose difference is 2, (11, 31), (17, 19)........ are the example of twin prime numbers.

Reference no: EM131129971

Questions Cloud

Aspects of the fasb conceptual framework : Determine whether the following statements are true or false. If a statement is false, explain why. 1. Comprehensive income includes changes in equity resulting from distributions to owners.
Create an application that contains an enumeration : Create an application that contains an enumeration (enum) that represents the days of the week.  Display a list of the days, and then prompt the user for a day
How might reports empower an organization : Provide responses to the following questions, based on your readings and class discussions, in 100-200 words each. Describe the difference between internal and external reports. What functions might an organization's internal reports serve? What fun..
What is the maximum inventory achieved during production run : A shop that makes candles offers a scented candle, which has a monthly demand of 360 boxes. Candles can be produced at a rate of 36 boxes per day. The shop operates 20 days a month. What is the annual demand? What is the maximum inventory achieved du..
Write the definition of a void method : Write the definition of a void method that takes as input two parameters of type int, say sum and testScore. The method updates the value of sum by adding the value of testScore. The new value of sum is sent back to the caller statement
The information technology outsourcing business : What recommendation would you give to the Brazialian government and it's outsourcing industry in order to improve their prospects for success in building a strong international competetive position in the information technology outsourcing business?
When it comes to permission marketing : When it comes to permission marketing, do you think that people take the time to unsubscribe or do you think it's easier to just delete the emails if they don't interest you? How does just deleting that emails skew marketing data that the company is ..
Social and cultural issues leaders in health care face : Find an article on a current event that deals with the social and cultural issues leaders in health care face. Write a 1,750- to 2,100-word analysis of ethics and ethical responsibilities in health care. What is the issue? How was it handled? What wa..
Corporate level strategy is set of actions in firm : Corporate level strategy is a set of actions in a firm takes to gain competitive edge by having different businesses competing with different products in different markets. Low diversification- this involves minimal diversification most of the revenu..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

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

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