Share on Google+Share on Google+

asma alkakouri
java quetion
0 Answer(s)      6 years ago
Posted in : Java Beginners

A company has four salespeople (numbered from 1 to 4), who sell five different products (numbered from 1 to 5). Once a day, each salesperson passes in a slip for each type of product sold. Each slip contains the following: ï??· The salesperson number, ï??· The product number, ï??· The total Qatar Riyals value of that product sold that day. 1. Propose a class Slip to store the data of sales slips. 2. Each salesperson passes in between 0 and 5 sales slips per days. Propose an array, slips, to store the data of sales slips for a whole month (31 days). Assume that the total QR value of each product never exceeds 99QR. Write a method, collectSlips, to collect the sales information for a month by randomly filling the slips array. 3. Write a method, summarizeSalesSlips, that will read all this information for one monthâ??s sales and summarize the total sales by salesperson and by product. All the totals should be stored in sales, a two dimensional array. 4. Write a method, printTotalSales, to display the sales results in tabular format, with each column representing a particular salesperson and each row representing a particular product. 5. Write a method, totalSalesProduct, to Cross-total each row to get the total sales of each product for the month. Print these totals. 6. Write a method, totalSalesPerson, to Cross-total each column to get the total sales by each salesperson for last month. Print these totals. 7. Modify your tabular output to include these cross-totals to the right of totals rows and to the bottom of the totals columns. All the code related to questions 2-7 should be written inside a second class TotalSales. The main function should be part of this class.

Ads

View Answers









Related Tutorials/Questions & Answers:
java quetion
java quetion  A company has four salespeople (numbered from 1 to 4), who sell five different products (numbered from 1 to 5). Once a day, each salesperson passes in a slip for each type of product sold. Each slip contains
quetion - Java Beginners
Questions for Java Beginners  Hi, I am looking for the questions for Java Beginners.Thanks in Advance
Advertisements
java - Java Beginners
java  sir, there is few questions which i tried but did not get succeed in it...will you help me to overcome it? my quetion is two numbers...; } } return true; } } For more information on java visit
java
java  diff bt core java and java
java
java  what is java
Java
Java   Whether Java is pure object oriented Language
JAVA
JAVA  how the name came for java language as "JAVA
java
java  different between java & core java
java
java  explain technologies are used in java now days and structure java
java
java   why iterator in java if we for loop
java
java  what is java reflection
java
java  is java open source
java
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
Java
Java  how to draw class diagrams in java
java
java  explain object oriented concept in java
Java
Java   Whether Java is Programming Language or it is SOftware
java
java  what are JAVA applications development tools
java
java  why to set classpath in java
java
java  give a simple example for inheritance in java
java
java  Does java allows multiline comments
java
java   What is ?static? keyword
java
java  write a java program using filenotfoundexception
java
java   difference between class and interface
java
java  why multiple inheritance is not possible in java
java
java  is java purely object oriented language
java
java  how use java method
java
java  send me java interview questions
java
java  write a program in java to acess the email
java
java  Write a java code to print "ABABBABCABABBA
java
java  why to set classpath in java
Tutorials   
Java Spring Hibernate Struts Training What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? neo4j-server.properties file location SASLError using PLAIN: not-authorized how to convert war file into .exe file using java code

Ads

 
Advertisement null

Ads