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.
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..
|