Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Java 91. 15 pts] Write class Citites which han Fine intunet sarielrs: - name serien - civing sering - detechalmint Date - espiratiandate: Date

Java image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Java
91. 15 pts] Write class Citites which han Fine intunet sarielrs: - name serien - civing sering - detechalmint Date - espiratiandate: Date - cumendabe: Date \&This is stuticleal and set to loderys date. Clais Date is previded for you, bo pau do not nand ta inplement it. Your Ginen dass atwould have: - A conutructor that initialares the name, oaide, doteogsirth opingoionOate. respectivelik and finaly the expirabondete to 2.1.3900 - A third conitructer that abei only name and ewili, me altes the dafrajsiath day. - set ond get methods for all your inatance varablen with ralid values. The class atse should incluse method that: 1. checkf xpiration. check the cbject's expiration hes ecturitd feeed to check curtent date for thisf and print a statement that alerts the woer. White another clais caled Cninenfirst that induses the man methed. Your man should do the following: - Print the Currete Pute ot the top ef the coniele. - Creale an artay of thoe Citien with a sere of 5 . - Creste each object of sthe array matualy and inital of it as followi. - Array element 9. When yos create the objet, pasu to the conutructor 9 purameters - Arras element 2- piss to the conctructar: Hinti use "impent jawa time tocalDer finte", and the wanuble of the dass clled "Localbate fime" asigned to "locabute Timesest wh muthoch dayimenth/year formas for tedey's date. Yeur eutput thendd isok eactly as shewe teles Todars Date 16/sar?az? Error: Day our of eange Eror: Minth eut of rance Erion Year out of range N/A bom on 94/01/2000 and 19 expiration on 9A/CL/3600 N/A bom en 01/01/2000 and 15 expiratien th 1t01/3000 Saca was boen en D6, 03/ /ass and 10 espirecon on 17/4/2 as Noure was bom en 13/05/1970 and 15 expincith on 16-94/2630 Al's chel io has expired. Q2. [ 5 pts] A company has 3 salesmen and sells 5 different products. Each month the company computes: - the total number of sold items of each product, and - the total number of sold item for each salesman. Use a two-dimensional array to store the number of products sold by each salesman. Read the number of sold items of each salesman from the user. Then print the total number of sold items for each product and the total number of sold item of each salesman. Sample output: Enter the number of sold items for salesman 0 Product 0: 2 Product 1:5 Product 2: 3 Product 3:4 Product 4: 2 Enter the number of sold items for salesman 1 Product 0: 6 Product 1: 7 Product 2:2 Product 3: 4 Product 4: 5 Enter the number of sold items for salesman 2 Product 0: 2 Product 1:4 Product 2: 3 Product 3:9 Product 4:6

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

Derive the more general form of the Laplace equation of capillarity

Answered: 1 week ago