Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
alx_20230801
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
alx_20230801
Commits
e5d5c32b
Commit
e5d5c32b
authored
Aug 03, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drugi program
parent
25d48dd6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
1 deletions
+39
-1
Klient1_OdczytajWszystkie.java
...ain/java/ogloszenia/klient/Klient1_OdczytajWszystkie.java
+1
-1
Klient2_JednoOgloszenie.java
.../main/java/ogloszenia/klient/Klient2_JednoOgloszenie.java
+38
-0
No files found.
OgloszeniaKlient/src/main/java/ogloszenia/klient/OdczytajWszystkie.java
→
OgloszeniaKlient/src/main/java/ogloszenia/klient/
Klient1_
OdczytajWszystkie.java
View file @
e5d5c32b
...
...
@@ -7,7 +7,7 @@ import ogloszenia.generated.OgloszenieSamochodowe;
import
java.util.List
;
public
class
OdczytajWszystkie
{
public
class
Klient1_
OdczytajWszystkie
{
public
static
void
main
(
String
[]
args
)
{
try
{
System
.
out
.
println
(
"Startujemy..."
);
...
...
OgloszeniaKlient/src/main/java/ogloszenia/klient/Klient2_JednoOgloszenie.java
0 → 100644
View file @
e5d5c32b
package
ogloszenia
.
klient
;
import
java.util.Scanner
;
import
ogloszenia.generated.*
;
public
class
Klient2_JednoOgloszenie
{
public
static
void
main
(
String
[]
args
)
{
OgloszeniaService
service
=
new
OgloszeniaService
();
Ogloszenia
proxy
=
service
.
getOgloszeniaPort
();
System
.
out
.
println
(
"Ujemne id kończy program"
);
Scanner
sc
=
new
Scanner
(
System
.
in
);
while
(
true
)
{
System
.
out
.
print
(
"Podaj id szukanego ogłoszenia: "
);
int
id
=
sc
.
nextInt
();
if
(
id
<=
0
)
break
;
try
{
OgloszenieSamochodowe
ogl
=
proxy
.
readOne
(
id
);
System
.
out
.
printf
(
"%s %s za %s\n"
,
ogl
.
getMarka
(),
ogl
.
getModel
(),
ogl
.
getCena
());
System
.
out
.
println
(
ogl
.
getTytul
());
System
.
out
.
println
(
ogl
.
getOpis
());
}
catch
(
NieznanyRekord_Exception
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
}
catch
(
BladBazyDanych_Exception
e
)
{
System
.
out
.
println
(
"Inny błąd serwera: "
+
e
);
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"Inny błąd: "
+
e
);
}
}
}
}
// alt+Enter intellij =~= Ctrl+1 w eclipse
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment