Use of arrays with a programming language

Assignment Help JAVA Programming
Reference no: EM131338277

Introduction to Programming (COMP 10005)

Learning Outcomes:

1. Use different program control statements in a programming language

2. Demonstrate the use of arrays with a programming language

3. Define and work with classes and objects in a programming language.

1.1 a. XYZ Group is a leading construction company in Oman and they are specialize in delivering solutions to diverse businesses in Oman and UAE. Inorder to motivate the employees, the company has decided to announce the different types of bonus depends up on the employee's Grade

If the employee belong to

Grade A bonus=20% basic

Grade B bonus=15% basic

Grade C bonus=10% basic

Grade D bonus=7% basic

Grade E bonus=5% basic

Write a Java program using classes and object to read the employee code (Integer), employee name (string), Basic salary (double), Category (Character) then calculate the bonus (double) and the total salary (double) eligible for each employ. The output should have the employee code, employee name, basic salary, grade bonus and the total salay. The program must use switch-case construct for calculations. Test your program for 5 employees.

Sample Output

Employee code             1234

Employee Name        :  aaaaa

Basic Salary            :   1000 OMR

Grade                             :   A/B/C/D/E

Bonus                              :  1111      OMR

Total Salary                    :   Basic salary + Bonus

b. Students are instructed to show the 5 test cases for the above scenario

1.2 Write a Java program to declare and store numbers from 1 to 10 in a single dimensional array and display the output in the following format.

1

2  3

4  5  6

7  8  9  10

1.3 a. Oman Data Park is an organization in Oman providing IT Services to its customers. The company has a turnover of around 2.0 Billion OMR in a year. The company has assigned with a new project to automate the electricity bill processing using Java technology. As a learners of Java technology you are expected to help the Oman Data Park by wring a Java program using classes and objects that calculates and prints the monthly electricity bill for the customers. The programs should read the customer number (Integer), Customer name(string), previous month reading (Integer), current month reading (Integer).

Note: Assume that OMR refers to Omani Rials

Calculations:

Units consumed=current month reading-previous month reading

First 100 units, unit rate = 1.25 OMR

Next 250 units (101-250), unit rate = 3.10 OMR

Next 300 units (251-550), unit rate = 5.00 OMR

Remaining units, unit rate = 4.00 OMR

A sample output is as follows:

Customer Id : 1234
Customer Name : xxxxxxxxxxxxxxxx
Previous Month reading : 1000
Current Month reading : 2200
Units consumed : 1200
Total amount (OMR) : 111111

b. Students should show the result for 5 different values

Verified Expert

This task was basically to make students learn about classes and objects as well as control statements in java.There were 2 questions related to classes and objects and 1 of array.Questions of classes were solved by making classes and invoking methods on their objects.For the question related to array,numbers from 1 to 10 were stored in an array and printed according to the asked format by running loops.

Reference no: EM131338277

Questions Cloud

Write a model for the average monthly temperature in buffalo : Write a sine function which models the oscillation of tides in Savannah, Georgia, if the equilibrium point is 4.24 feet, the amplitude is 3.55 feet, the phase shift is 4.68 hours, and the period is 12.40 hours.
Improve doctor-patient relationships : Do you agree with the following statement "Today's patient role is more often chronic rather than acute; is based on risk of disease rather than existing illness?" How can medical training be reformed to improve doctor-patient relationships?
Compute the projected after tax operating cash flow : Current liabilities are expected to increase to $17 million. Compute the projected after-tax operating cash flow for Steber during the coming year.
Effective job of keeping doctors : Explain why DRGs were developed, and how they were designed to function. In your opinion, has the government's implementation of DRGs done an effective job of keeping doctors within cost limits when treating patients? Your response should be at le..
Use of arrays with a programming language : Use different program control statements in a programming language - Demonstrate the use of arrays with a programming language and Define and work with classes and objects in a programming language.
How does this compare to the actual average : According to your model, what is the average temperature in May? How does this compare to the actual average?
Prepare a classified balance sheet in good form : Prepare a classified balance sheet in good form. Common stock authorized was400,000shares, and preferred stock authorized was 20,000 shares.
Compute the expected net cash flows for year 7 : Compute the expected net cash flows for year 7. Include in your year 7 calculations the proceeds from the salvage value of the masher and recovery of net working capital at the beginning of year 8.
Interactions of members and increase productivity : Working with organizations to improve the interactions of members and increase productivity through collaborative behavior is an essential role of the organization development human resources specialist.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a class that reads a file

In java, write a class that reads a file and outputs a list of the unique words in the file and the number of times each unique word occurs.Hint: use a HashMap with keys being the words and values being integer counts associated with the words.

  Create a class named purchase

Create a class named Purchase. Each purchase contains an invoice number, amount of sale, and amount of sales tax. Include set methods for the invoice number and sale amount.

  Evaluate the rtas resource requirements

Design and implement a set of classes and interfaces and use them to evaluate the RTA's resource requirements.

  Implementing a binary tree write a generic implementation

Implementing a Binary Tree Write a generic implementation of a binary tree class using an internal node class TreeBinUMUC and NodeTreeBin

  Write a method called hash midpoint

Write a method called hasMidpoint that accepts three integers as parameters and returns 'true' if one of the integers is the midpoint between the other two integers; that is to is if one integer is exactly between the two others. The method should re..

  What vulnerabilities might these threats exploit

What special consequences do you foresee from information security breaches confined to online retail banking compared to online commercial banking?

  Create a java program

UserApp and PrettyPrintUtility multiple times (supplying different TransData test file names), the AutoTesterUtility PROGRAM will be the driver program.

  Complete the analysis and design for the project

You will complete the analysis and design for the project. You will use the guidelines described above and the grading rubric below to complete this document.

  Provide java code for a method

Provide Java code for a method that would perform functionality of your choice. Try to create functionality that is unique - something that you could use. Be sure to include an example call to your method and explain the code you developed.

  Complete and fully test the class characteristic

Complete and fully test the class Characteristic that Exercise explains. Suppose a class Characteristic that will be used in an online dating service to assess how compatible two people are.

  Is a java applet different than a java program

Is a Java Applet different than a Java program? Why do we need to write HTML code for a java Applet to run it? How do we test a Java Applet

  Layout of a java code

I need assistance in remarking the enclosed Java Code high-lighting, things like code layout, use of variable names, general readability and understandability.

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