Write a java program using classes and object

Assignment Help JAVA Programming
Reference no: EM131313826

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: EM131313826

Questions Cloud

Creating a perceptual map for the industries : 1. Creating a Perceptual map for the industries (Walmart and Target) and at least 4 other competitors including quality and quantity 2. Identifying the trends of Walmart and Target within the SWOTT analysis
Examples of contemporary management techniques : What are some examples of Contemporary Management techniques not being used by Amazon.com?
How long can the fossil fuel sustain energy : If no, give analysis as to why it will not overtake fossil fuel gasoline energy car? How long can the fossil fuel sustain energy for 5 billion population?
Explain the traditional approach to training : Describe why the competencies of the past are not compatible with the competencies of the future for the global organization. Explain the competency-based and the traditional approach to training
Write a java program using classes and object : Use different program control statements in a programming language and demonstrate the use of arrays with a programming language and Define and work with classes and objects in a programming language.
Write a summary about th egiven reading article : Write a summary about th egiven reading article.Nationalism and Sport Allain, Kristi A. "Kid Crosby or Golden Boy: Sidney Crosby, Canadian National Identity, and the Policing of Hockey Masculinity." International Review for the Sociology of Sport.
What steps are needed to select a brand and model : Scenario: A local private school has aging hardware and software in its classrooms. Students, teachers, and parents have complained and are asking the school's directors to purchase new technology to better prepare students for life after graduati..
Does bath and body works have a formal quality system : Does "bath and body works"have a formal quality system? How do they measure quality, any tools used? How could the company improve their approach to quality management?
Information security issues associated with cloud computing : Lets discuss some information security issues associated with cloud computing services, and how can an individual or organization protect themselves against them.

Reviews

inf1313826

12/22/2016 4:08:39 AM

I want this assignment of ITP. Please hire the best tutor who can give me the best solution for this assignment. And who has the knowledge about this assignment. Submission of Assignment Proposal Evaluation Guidelines:The evaluation will be done on the strength of analysis presented in the proposal. You need to submit a work proposal for this assignment in the form of a completed Word document on Moodle before 8 PM on Thursday which must include: What you will do with the given tasks and the dates by when they will be completed General overview of initial understanding of solutions to all the tasks. Identification of Literature Resources

len1313826

12/15/2016 7:36:58 AM

Learning Outcomes Skills Acquired • Use different program control statements in a programming language Problem solving, analytical, decision-making, math & logical, programming, code documentation, testing, technical, creativity • Demonstrate the use of arrays with a programming language Problem solving, analytical, conceptual, experimentation, math & logical, reasoning, decision-making, evaluating alternatives / solutions, practicing debugging, programming, code documentation, testing, technical, creativity. • Define and work with classes and objects in a programming language Problem solving, analytical, math & logical, cognitive, programming, code documentation, testing, technical, creativity.

len1313826

12/15/2016 7:36:42 AM

Electricity Bill processing using Classes objects - 19-24 No evidence of application of theory in practice Content broadly relevant but with limited or little application of theory into practice 25-30 Adequate evidence of the application of theory in practice of theory Good knowledge of the application of theory in practice Well-structured with evidence of independent application of reading into practice with supporting the argument. 30-35 Outstanding use of analytical skills and reflective practice demonstrating personal learning. Outstanding knowledge and depth of understanding of principles and concepts and /or outstanding application of theory in practice Evidence of reading into practice through outstanding range of educational literature. Excellent presentation, logically structured, using correct grammar and spelling.

len1313826

12/15/2016 7:36:15 AM

Implementation of Switch_case - 16-18 Excellent use of analytical skills and reflective practice demonstrating personal learning. Excellent knowledge and understanding of principles and concepts. Evidence of reading an excellent range of educational literature. Appropriate referencing and bibliography Good presentation, competently structured, using correct grammar and spelling. 19-21 No evidence of application of theory in practice Content broadly relevant but with limited or little application of theory into practice

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