Java code- rješavanje scenarija

poruka: 5
|
čitano: 945
|
moderatori: XXX-Man, vincimus
1
+/- sve poruke
ravni prikaz
starije poruke gore
11 godina
neaktivan
offline
Java code- rješavanje scenarija
Relativno sam nova u Java programiranju (cca 3mj) i dobila sam zadatak riješiti ovaj scenarij kod kojeg ne znam gdje/kako/što uopće započeti. U svakom slučaju, svaka informacija je dobrodošla.
Da ne duljim,

The Scenario

Transmere Trading Company sells their products only through their sales representatives. The company divides the country into four regions: North, South, East and West. A sales representative is directed by the company to work in one of these regions. The company may decide to change the region in which a representative is working. Transmere Trading employs two types of sales representatives: salaried representatives and freelance representatives. Salaried representatives receive a basic annual salary plus a commission, which is a percentage of the value of the sales that they have made. This percentage is fixed annually and is currently set at 5% for the first £1000 of sales and at 8% for sales over £1000. Freelance representatives are paid only by commission; the percentage being set by negotiation between the individual representatives and the company. The company keeps a record of the name of each employee and assigns to each employee a unique employee identifier consisting of two letters followed by four digits.
Transmere Trading owns a small fleet of cars. The company keeps a record of the make, model and registration number of each car. Every salaried sales representative is assigned a company car. Freelance representatives are not assigned company cars.

Your task is to design and implement a prototype system that will enable Transmere Trading to keep track of its fleet of cars and sales representatives. Your system should provide the following functionality. It should allow the company to:

•Add and remove representatives from its list of employees.

•Add and remove cars from its fleet.

•Allocate a car to a sales representative.

•Change the car allocated to a sales representative

•Modify the value of the sales made by a representative.

•Obtain a report on the current earnings of a representative given their employee number.

•Given the registration number of a car, obtain the details of the representative to whom the car is currently allocated.

•List all cars, with details of its user if it is currently allocated.

Access to the facilities of your system should be via text-based menus that appear on the terminal screen. All input should be via the keyboard
 
0 0 hvala 0
13 godina
neaktivan
offline
Java code- rješavanje scenarija

Pa, neznam što te konkretno muči? Ovako nakon što sam letimično pogledao zadatak, prvo što mi pada na pamet je da ti treba jedna glavna while petlja, koja će se stalno izvršavat, dok god ne uneseš opciju za gašenje programa, koja će biti jedna od opcija tekstualnog menija koji će tvoj program nuditi. Ostale opcije tog menija su one opisane u zadatku.

Za predstavnika možeš napraviti klasu koja će određivati njegovo ponašanje, kao i za auto. Sve predstavnike i njihove veze sa autima i sve što ti treba ćeš spremati u listama, odnosno mapama.

Moj PC  
1 0 hvala 0
11 godina
neaktivan
offline
Re: Java code- rješavanje scenarija

Pa konkretno me muči kako napraviti petlju...

14 godina
neaktivan
offline
Re: Java code- rješavanje scenarija

Pa pokaži što si do sada napravila. Ili samo tražiš naivca koji bi ti sve napravio?

Kada lajavci laju onda završe ovako: http://i471.photobucket.com/albums/rr77/toropreto/2012-07-0813_30_07.gif
13 godina
offline
Re: Java code- rješavanje scenarija
bozzena kaže...

Pa konkretno me muči kako napraviti petlju...

 

while(uvjet izvođenja){

      blok naredbi

}

 

{#}

1
Nova poruka
E-mail:
Lozinka:
 
vrh stranice