>>> software:76

Subject: Report on Software Engineering Lecture 4/21
From:    kenchi@osn.u-ryukyu.ac.jp (Kenichi OGATA)
Date:    Mon, 27 Apr 1998 15:06:30 +0900
Cc:      kenchi@osn.u-ryukyu.ac.jp

学籍番号:965716K   氏名:緒方健一




>>> software:77

Subject: Report on Software Engineering Lecture 4/21
From:    kenchi@osn.u-ryukyu.ac.jp (Kenichi OGATA)
Date:    Mon, 27 Apr 1998 15:09:08 +0900
Cc:      kenchi@osn.u-ryukyu.ac.jp

学籍番号:965716K   氏名:緒方健一

● 集合Dを配列に格納するPerlのプログラムを配列を使って作成せよ。

プログラム% 1.pl

$\ = "\n";
$, = " ";
@array = ( j96050, j96048, j96004, j96002, j96007 );
print '@array=',@array;


実行結果% perl5 1.pl

@array= j96050 j96048 j96004 j96002 j96007

● 集合Eを生成するPerlのプログラムを配列を使って作成せよ。

プログラム% 2.pl

$\ = "\n";
$, = " ";
@array = ( j96050, j96048, j96004, j96002, j96007 );
print '@array=',@array;
@barray = ( j96016 );
print '@barray=',@barray;
@carray = ( @array, @barray );
print '@carray=',@carray;

実行結果% perl5 2.pl

@array= j96050 j96048 j96004 j96002 j96007
@barray= j96016
@carray= j96050 j96048 j96004 j96002 j96007 j96016

● 集合Hを生成するPerlのプログラムを配列を使って作成せよ。

プログラム% 3.pl

$\ = "\n";
$, = ' ';
@array = ( j96050, j96048, j96004, j96002, j96007 );
print '@array=',@array;

@barray = ( j96050, j96048 );
print '@barray',@barray;

@lhash{@array} = undef;

%result = %lhash;
foreach (@barray){
     delete $result{$_};
}
print '@array-@barray';
print keys %result;

@carray = ( j96016 );
print '@carray=',@carray;

@darray = ( %result, @carray );
print '@darray=',@darray;

実行結果% perl5 3.pl

@array= j96050 j96048 j96004 j96002 j96007
@barray j96050 j96048
@array-@barray
j96007 j96002 j96004
@carray= j96016
@darray= j96007  j96002  j96004  j96016

● f'およびf'gを表す集合を連想配列を使って作成してみよ。

プログラム% 4.pl

$\ = "\n";
$, = " ";
$a{'j96050'} = '永田美穂';
$a{'j96048'} = '豊平絵梨';
$a{'j96004'} = '天野嘉登';
$a{'j96002'} = '赤嶺有平';
$a{'j96007'} = '新垣武士';
print join(" \n",%a);
print "\n";

$b{'965750K'} = '永田美穂';
$b{'965748H'} = '豊平絵梨';
$b{'965704F'} = '天野嘉登';
$b{'965702K'} = '赤嶺有平';
$b{'965707A'} = '新垣武士';
print join(" \n",%b);

実行結果% perl5 4.pl

j96007 
新垣武士 
j96002 
赤嶺有平 
j96004 
天野嘉登 
j96048 
豊平絵梨 
j96050 
永田美穂


965702K 
赤嶺有平 
965707A 
新垣武士 
965750K 
永田美穂 
965704F 
天野嘉登 
965748H 
豊平絵梨


#先ほど、失敗メールを出してしまって申し訳ありませんでした。



>>> software:78

Subject: Report on Software Engineering Lecture 4/21
From:    j96021@pw021.st.ie.u-ryukyu.ac.jp (Yukako Kishi)
Date:    Thu, 7 May 1998 20:32:09 +0900 (JST)
Cc:      j96021@pw021.st.ie.u-ryukyu.ac.jp



ソフトウエア工学         レポート1

                                                965721F   岸 由和子


###################################
プログラム
###################################

#!/usr/bin/perl5

%a = ("j96050","Nagata Miho","j96048","Toyohira Eri","j96004","Amano Yoshito",
      "j96002","Akamine Yuhei","j96007","Arakaki Takeshi");


#●集合Dを配列に格納するperlのプログラムを配列を使って作成せよ。

@D = keys %a;
print "\n--------print D\n";
for $i (@D){
    print"$i\n";
}

#●集合Eを生成するperlのプログラムを配列を使って作成せよ。
%a = (%a,"j96021","Yukako kishi");
@E = keys %a;
print "\n-------print E \n";
for $i (@E){
    print"$i\n";
}


#●集合Hを生成するperlのプログラムを配列を使って作成せよ。
$F = "j96021 j96024 j96040 j96043 j96045 j96048 j96050 j96058";
%H = %a;
for $i (@E){
    if ($F =~ /$i/){
        delete $H{$i};
    }
}

@H = keys %H;
print "\n-------print H\n";
for $i (@H){
    print"$i\n";
}

#●f'及びf'gを表す集合を連想配列を使って作成して見よ。
%f = %a;

$who = "j96050";
print "\n------who is $who ?\n";
print "$f{$who}\n";

%g = ("965750K","j96050","965748H","j96048","965704F","j9604",
      "965702K","j96002","965707A","j96007");


print "\n###########now creatinf f'g !!!!!!!!\n";

@key = keys %g;
for $i (@key){ 
    $fg {$i} = $f{$g{$i}};
}
$who = "965750K";
print "\n------who is $who ?\n";
print "$f{$g{$who}}\n";





#####################################
実行結果
#####################################

pw021: {1} % perl5 rep1

--------print D
j96007
j96002
j96004
j96048
j96050

-------print E 
j96007
j96002
j96021
j96048
j96004
j96050

-------print H
j96007
j96002
j96004

------who is j96050 ?
Nagata Miho

###########now creatinf f'g !!!!!!!!

------who is 965750K ?
Nagata Miho




>>> software:79

Subject: Report on Software Engineering Lecture 4/21
From:    j96024@pw024.st.ie.u-ryukyu.ac.jp (R Gima)
Date:    Thu, 7 May 1998 20:58:33 +0900 (JST)
Cc:      j96024@pw024.st.ie.u-ryukyu.ac.jp



     情報工学科 3年次 965724A 儀間良子


○ プログラム


#!/usr/bin/perl5


# 集合Dを配列に格納するPerlのプログラムを配列を使って作成せよ。
@D = ("j96050","j96048","j96004","j96002","j96007");

# 集合Eを生成するPerlのプログラムを配列を使って生成せよ。
@E = (@D,"j96024");

# 集合Hを生成するPerlのプログラムを配列を使って作成せよ。
$F = "j96021 j96024 j96040 j96043 j96045 j96048 j96050 j96056";
for $check ( @E ) {
    unless ($F =~ /$check/) { @H = (@H, $check); }
}

# f’およびf’gを表す集合を連想配列を使って作成してみよ。
$f2{"j96050"} = "Miho Nagata   ";
$f2{"j96048"} = "Eri Toyohira  ";
$f2{"j96004"} = "Yoshito Amano ";
$f2{"j96002"} = "Yuhei Akamine ";
$f2{"j96007"} = "Takesi Arakaki";
$f2{"j96024"} = "Ryoko Gima    ";

$f2g{"965750K"} = "Miho Nagata   ";
$f2g{"965748H"} = "Eri Toyohira  ";
$f2g{"965704F"} = "Yoshito Amano ";
$f2g{"965702K"} = "Yuhei Akamine ";
$f2g{"965707A"} = "Takesi Arakaki";
$f2g{"965724A"} = "Ryoko Gima    ";


# それぞれの内容・実行結果の表示

print "Show => D = { @D } \n\n";
print "Show => E = { @E } \n\n";
print "Show => F = { $F } \n\n";
print "Show => H = { @H } \n\n";

print "f' = { \n";
while (($number, $name) = each(%f2)){
    print "      ( $number, $name )\n";
    }
print " }\n\n";

print "f'g = { \n";
while (($number, $name) = each(%f2g)) {
    print "       ( $number, $name )\n";
}
print " } \n\n";



○ 実行結果

pw024: {70} % perl5 0421.pl
Show => D = { j96050 j96048 j96004 j96002 j96007 } 

Show => E = { j96050 j96048 j96004 j96002 j96007 j96024 } 

Show => F = { j96021 j96024 j96040 j96043 j96045 j96048 j96050 j96056 } 

Show => H = { j96004 j96002 j96007 } 

f' = { 
      ( j96007, Takesi Arakaki )
      ( j96002, Yuhei Akamine  )
      ( j96004, Yoshito Amano  )
      ( j96048, Eri Toyohira   )
      ( j96050, Miho Nagata    )
      ( j96024, Ryoko Gima     )
 }

f'g = { 
       ( 965702K, Yuhei Akamine  )
       ( 965724A, Ryoko Gima     )
       ( 965707A, Takesi Arakaki )
       ( 965750K, Miho Nagata    )
       ( 965704F, Yoshito Amano  )
       ( 965748H, Eri Toyohira   )
 } 









>>> software:80

Subject: Report on Software Engineering Lecture 4/21
From:    j96040@pw040.st.ie.u-ryukyu.ac.jp (ERIKO CHINA)
Date:    Fri, 8 May 1998 13:31:52 +0900 (JST)
Cc:      j96040@pw040.st.ie.u-ryukyu.ac.jp

#!/usr/bin/perl5

# 問題1 集合Dを配列に格納するPerlのプログラムを配列を使って作成せよ。
@D = ("j96050","j96048","j96004","j96002","j96007");
print "print D \n";
for $i(@D){
    print "$i\n";
    } 
print "\n";

# 問題2 集合Eを生成するPerlのプログラムを配列を使って生成せよ。
@X = ("j96040");
@E = (@D,@X);
print "\n print E \n";
for $i(@E){
    print "$i\n";
    }
print "\n";

# 問題3 集合Hを生成するPerlのプログラムを配列を使って作成せよ。
$F = ("j96050 j96048 j96040");
for $check(@E){
    unless($F =~/$check/){ @H = (@H, $check);}
    }
print "\n print H \n";
for $i(@H){
    print "$i\n";
    }
print "\n";

# 問題4 f'およびf'gを表す集合を連想配列を使って作成せよ。
$f{"j96050"} = "nagata miho";
$f{"j96048"} = "toyohira eri";
$f{"j96004"} = "amano yosito";
$f{"j96002"} = "akamine yuhei";
$f{"j96007"} = "arakaki takesi";
$f{"j96040"} = "china eriko";
print "\n print f'\n";
while (($key,$value) = each(%f)){
    print "$key  $value\n";
    }
print "\n";

$fg{"965750K"} = "nagata miho";
$fg{"965748H"} = "toyohira eri";
$fg{"965704F"} = "amano yodito";
$fg{"965702K"} = "akamine yuhei";
$fg{"965707A"} = "arakaki takesi";
$fg{"965740B"} = "china eriko";
print "\n print f'g\n";
while (($key,$value) = each(%fg)){
    print "$key  $value\n";
    }
print "\n";

実行結果
pw040: {1} % perl5 kadai1.pl

print D 
j96050
j96048
j96004
j96002
j96007


 print E 
j96050
j96048
j96004
j96002
j96007
j96040


 print H 
j96004
j96002
j96007


 print f'
j96007  arakaki takesi
j96002  akamine yuhei
j96040  china eriko
j96004  amano yosito
j96048  toyohira eri
j96050  nagata miho


 print f'g
965702K  akamine yuhei
965740B  china eriko
965707A  arakaki takesi
965750K  nagata miho
965704F  amano yodito
965748H  toyohira eri

pw040: {2} % 







>>> software:81

Subject: Report on Software Engineering Lecture 4/21
From:    j96056@pw056.st.ie.u-ryukyu.ac.jp (takako FUJIWARA)
Date:    Fri, 8 May 1998 13:35:22 +0900 (JST)
Cc:      j96056@pw056.st.ie.u-ryukyu.ac.jp

4/21 Perlの宿題     965756J 藤原貴子

・集合Dを配列に格納するプログラムを配列を使って作成せよ。
pw056: {1} % perl5 -de 0
  DB<1> @D = (j96050,j96047,j96004,j96002,j96007)
  DB<5> for $i (@D) {print "$i\n"}
j96050
j96048
j96004
j96002
j96007

・集合Eを生成するPerlのプログラムを配列を使って作成せよ。
  DB<6> @E = (@D,j96056)
  DB<7> for $i (@E) {print "$i\n"}
j96050
j96048
j96004
j96002
j96007
j96056

・集合Hを生成するPerlのプログラムを配列を使って作成せよ。
pw056: {1} % perl5 -de 0
main::(-e:1):	0
  DB<1> @D = (j96050,j96048,j96004,j96002,j96007)

  DB<2> @E = (@D,j96056)

  DB<3> @F = (j96050,j96048,j96056)

  DB<4> $F1 = join(" ",@F)

  DB<5> foreach $check (@E){unless ($F1 =~ /$check/) { @H = (@H,$check);}}

  DB<6> p "F = {@F}\n"
F = {j96050 j96048 j96056}

  DB<7> p "H = {@H}\n"
H = {j96004 j96002 j96007}

・f'およびf'gを表す集合を連想配列を使って作成してみよ。
pw056: {1} % perl5 -de 0

  DB<2> $f1{'j96048'} = "豊平絵梨"

  DB<4> $f1{'j96004'} = "天野嘉登"

  DB<5> $f1{'j96002'} = "赤嶺有平"

  DB<6> $f1{'j96007'} = "新垣武士"

  DB<8> $f1{'j96056'} = "藤原貴子"

  DB<9> p "%f1"
f1
  DB<10> p %f1
j96007新垣武士j96002赤嶺有平j96056藤原貴子j96004天野嘉登j96048豊平絵梨j96050永
田美穂
  DB<11> p join(" ",%f1)
j96007 新垣武士 j96002 赤嶺有平 j96056 藤原貴子 j96004 天野嘉登 j96048 豊平絵梨
 j96050 永田美穂


pw56: {1} % perl5 -de 0 
main::(-e:1):	0

  DB<3> $f1g{'965750K'} = "永田美穂"

  DB<4> $f1g{'965748H'} = "豊平絵梨"

  DB<7> $f1g{'965704F'} = "天野嘉登"

  DB<9> $f1g{'965702K'} = "赤嶺有平"

  DB<10> $f1g{'965707A'} = "新垣武士"

  DB<11> $f1g{'965756J'} = "藤原貴子"

  DB<12> p "%f1g"
%f1g
  DB<13> p %f1g
965756J藤原貴子965702K赤嶺有平965707A新垣武士965750K永田美穂965704F赤嶺有平9657
02赤嶺有平965704天野嘉登965748H豊平絵梨
  DB<14> p join (" ",%f1g)
965756J 藤原貴子 965702K 赤嶺有平 965707A 新垣武士 965750K 永田美穂 965704F 赤
嶺有平 965702 赤嶺有平 965704 天野嘉登 965748H 豊平絵梨
  DB<15> exit







>>> software:82

Subject: Report on Software Engineering Lecture 4/21 
From:    j96048@pw048.st.ie.u-ryukyu.ac.jp (Eri.T)
Date:    Fri, 8 May 1998 13:37:16 +0900 (JST)
Cc:      j96048@pw048.st.ie.u-ryukyu.ac.jp


         4/21 の課題     
                                           965748H    豊平 絵梨

********プログラム

pw048: {1} % cat rep421.pl 
#!/usr/bin/perl5

#集合Dを配列に格納するperlのプログラムを配列を使って作成せよ。
@D = ("j96002","j96007","j96050","j96004");

#集合Eを生成するperlのプログラムを配列を使って生成せよ。
@E = (@D,"j96048");

#集合 H を生成するperlのプログラムを配列を使って生成せよ。
$F = "j96021 j96024 j96040 j96043 j96045 j96048 j96050 j96056";
for $k ( @E ) {
    unless ($F =~ /$k/) { @H = (@H, $k);} 
}

#f'およびf'gを表す集合を連想配列を使って作成してみよ。
$f{'j96002'} = Akamine;
$f{'j96007'} = Arakaki;
$f{'j96050'} = Nagata;
$f{'j96004'} = Amano;
$f{'j96048'} = Toyohira;

$fg{'965702K'} = Akamine;
$fg{'965707A'} = Arakaki;
$fg{'965750K'} = Nagata;
$fg{'965704F'} = Amano;
$fg{'965748H'} = Toyohira;

#実行結果の表示。

print "\n  D = {";
for $i ( @D ) { print " $i "};
print "}\n";

print "  E = {";
for $i ( @E ) { print " $i "}; 
print "}\n";

print "  H = {";
for $i ( @H ) { print " $i "};
print "}\n\n";

print "   f' = {\n ";
while (($key, $value) = each( %f )){
    print "       ($key, $value)\n ";
    }
    print "       }\n";

print "   f'g = {\n ";
while (($key, $value) = each( %fg )){
    print "        ($key, $value)\n ";
}
print "         }\n\n";


*******実行結果

pw048: {2} % perl5 rep421.pl 

  D = { j96002  j96007  j96050  j96004 }
  E = { j96002  j96007  j96050  j96004  j96048 }
  H = { j96002  j96007  j96004 }

   f' = {
        (j96007, Arakaki)
        (j96002, Akamine)
        (j96048, Toyohira)
        (j96004, Amano)
        (j96050, Nagata)
        }
   f'g = {
         (965702K, Akamine)
         (965750K, Nagata)
         (965707A, Arakaki)
         (965704F, Amano)
         (965748H, Toyohira)
          }
 
*******************************************
琉球大学工学部情報工学科3年次
豊平 絵梨
E-mail : j96048@pw048.st.ie.u-ryukyu.ac.jp
*******************************************



>>> software:83

Subject: Report on Software Engineering Lecture 4/21
From:    e965711@eve.u-ryukyu.ac.jp (ueda takea)
Date:    Sun, 10 May 1998 23:08:56 +0900
Cc:      e965711@eve.u-ryukyu.ac.jp


   「ソフトウェア工学のperlの課題」

     琉球大学情報工学科三年次 965711J 植田武昭


 ・集合Dを配列に格納するPerlのプログラムを配列を使って作成せよ。

・プログラム d.pl

@hairetsu = ( "j96050", " j96048", " j96004", " j96002", " j96007" );
print 'hairetsu =',@hairetsu;
print "\n";

・実行結果

hairetsu =j96050 j96048 j96004 j96002 j96007


 ・集合Eを生成するPerlのプログラムを配列を使って作成せよ。

・プログラム e.pl

@hairetsu1 = ( " j96050"," j96048"," j96004"," j96002"," j96007" );
print 'hairetsu1 =',@hairetsu1,"\n";
@hairetsu2 = ( " j96011" );
print 'hairetsu2 =',@hairetsu2,"\n";
@hairetsu3 = ( @hairetsu1, @hairetsu2 );
print 'hairetsu3 =',@hairetsu3,"\n";

・実行結果

hairetsu1 = j96050 j96048 j96004 j96002 j96007
hairetsu2 = j96011
hairetsu3 = j96050 j96048 j96004 j96002 j96007 j96011


 ・集合Hを生成するPerlのプログラムを配列を使って作成せよ。

・プログラム h.pl

@hairetsu1 = (" j96050"," j96048"," j96004"," j96002"," j96007" );
print 'hairetsu1 =',@hairetsu1,"\n";

@hairetsu2 = (" j96050"," j96048" );
print 'hairetsu2 =',@hairetsu2,"\n";

@lhash{@hairetsu1} = undef;

%result = %lhash;
foreach (@hairetsu2){
     delete $result{$_};
}
print 'hairetsu1-hairetsu2 =';
print keys %result,"\n";

@hairetsu3 = (" j96011" );
print 'hairetsu3 =',@hairetsu3,"\n";

@hairetsu4 = ( %result, @hairetsu3 );
print 'hairetsu4 =',@hairetsu4,"\n";

・実行結果

hairetsu1 = j96050 j96048 j96004 j96002 j96007
hairetsu2 = j96050 j96048
hairetsu1-hairetsu2 = j96007 j96002 j96004
hairetsu3 = j96011
hairetsu4 = j96007 j96002 j96004 j96011


 ・f'およびf'gを表す集合を連想配列を使って作成してみよ。

・プログラム fg.pl

%user = (
"j96050" => "永田美穂",
"965750K" => "永田美穂",
"j96048" => "豊平絵梨",
"965748H" => "豊平絵梨",
"j96004" => "天野嘉登",
"965704F" => "天野嘉登",
"j96002" => "赤嶺有平",
"965702K" => "赤嶺有平",
"j96007" => "新垣武士",
"965707A" => "新垣武士",
"j96011" => "植田武昭",
"965711J" => "植田武昭",
);

print "j96050  ",$user{"j96050"},"\n","965750K ",$user{"965750K"},"\n","\n";
print "j96048  ",$user{"j96048"},"\n","965748H ",$user{"965748H"},"\n","\n";
print "j96004  ",$user{"j96004"},"\n","965704F ",$user{"965704F"},"\n","\n";
print "j96002  ",$user{"j96002"},"\n","965702K ",$user{"965702K"},"\n","\n";
print "j96007  ",$user{"j96007"},"\n","965707A ",$user{"965707A"},"\n","\n";
print "j96011  ",$user{"j96011"},"\n","965711J ",$user{"965711J"},"\n","\n";

・実行結果

j96050  永田美穂
965750K 永田美穂

j96048  豊平絵梨
965748H 豊平絵梨

j96004  天野嘉登
965704F 天野嘉登

j96002  赤嶺有平
965702K 赤嶺有平

j96007  新垣武士
965707A 新垣武士

j96011  植田武昭
965711J 植田武昭


    ////////////////////////////////////////////////////////////
                  琉球大学工学部情報工学科三年次
                    植田武昭  < Takeaki Ueda >
             E-mail      : e965711@eve.u-ryukyu.ac.jp
                         : j96011@ie.u-ryukyu.ac.jp
             NIFTY-Serve : VET04534@nifty.ne.jp
    ////////////////////////////////////////////////////////////



>>> software:84

Subject: Report on Software Engineering Lecture 4/21
From:    e965723@eve.u-ryukyu.ac.jp (ginoza tomota)
Date:    Mon, 11 May 1998 22:56:18 +0900
Cc:      e965723@eve.u-ryukyu.ac.jp



   「ソフトウェア工学のperlの課題」

     琉球大学情報工学科三年次 965723b 宜野座 朝尚


 ・集合Dを配列に格納するPerlのプログラムを配列を使って作成せよ。

・プログラム D.pl

@d = ( "j96050", " j96048", " j96004", " j96002", " j96007" );
print 'd =',@d;
print "\n";

 実行結果
 
d =j96050 j96048 j96004 j96002 j96007


 ・集合Eを生成するPerlのプログラムを配列を使って作成せよ。

・プログラム E.pl

@d1 = ( " j96050"," j96048"," j96004"," j96002"," j96007" );
print 'd =',@d1,"\n";
@d2 = ( " j96023" );
print 'd2 =',@d2,"\n";
@e = ( @d1, @d2 );
print 'e =',@e,"\n";

 実行結果

d1 = j96050 j96048 j96004 j96002 j96007
d2 = j96011
e = j96050 j96048 j96004 j96002 j96007 j96023


 ・集合Hを生成するPerlのプログラムを配列を使って作成せよ。

・プログラム H.pl

@d1 = (" j96050"," j96048"," j96004"," j96002"," j96007" );
print 'd1 =',@d1,"\n";

@d2 = (" j96050"," j96048" );
print 'd2 =',@d2,"\n";

@lhash{@d1} = undef;

%result = %lhash;
foreach (@d2){
     delete $result{$_};
}
print 'd1-d2 =';
print keys %result,"\n";

@d3 = (" j96023" );
print 'd3 =',@d3,"\n";

@e = ( %result, @d3 );
print 'e =',@e,"\n";

 実行結果

d1 = j96050 j96048 j96004 j96002 j96007
d2 = j96050 j96048
d1-d2 = j96007 j96002 j96004
d3 = j96023
e = j96007 j96002 j96004 j96011


 ・f'およびf'gを表す集合を連想配列を使って作成してみよ。

・プログラム fg.pl

%user = (
"j96050" => "永田美穂",
"965750K" => "永田美穂",
"j96048" => "豊平絵梨",
"965748H" => "豊平絵梨",
"j96004" => "天野嘉登",
"965704F" => "天野嘉登",
"j96002" => "赤嶺有平",
"965702K" => "赤嶺有平",
"j96007" => "新垣武士",
"965707A" => "新垣武士",
"j96023" => "宜野座朝尚",
"965723B" => "宜野座朝尚",
);
print "j96050  ",$user{"j96050"},"\n";
print "j96048  ",$user{"j96048"},"\n";
print "j96004  ",$user{"j96004"},"\n";
print "j96002  ",$user{"j96002"},"\n";
print "j96007  ",$user{"j96007"},"\n";
print "j96011  ",$user{"j96011"},"\n","\n";

print "965750K ",$user{"965750K"},"\n";
print "965748H ",$user{"965748H"},"\n";
print "965704F ",$user{"965704F"},"\n";
print "965702K ",$user{"965702K"},"\n";
print "965707A ",$user{"965707A"},"\n";
print "965723B ",$user{"965723B"},"\n";



 実行結果

j96050  永田美穂
j96048  豊平絵梨
j96004  天野嘉登
j96002  赤嶺有平
j96007  新垣武士
j96023  宜野座朝尚

965750K 永田美穂
965748H 豊平絵梨
965704F 天野嘉登
965702K 赤嶺有平
965707A 新垣武士
965723B 宜野座朝尚



>>> software:85

Subject: Report on Software Engineering Lecture 4/21
From:    j96047@pw047.st.ie.u-ryukyu.ac.jp (Takayoshi Tomoyose)
Date:    Tue, 12 May 1998 12:11:55 +0900 (JST)
Cc:      j96047@pw047.st.ie.u-ryukyu.ac.jp


       ソフトウェア工学 レポート 4/21分
                                 965747K  友寄 隆令

  ◯ プログラム

#!/usr/bin/perl
# 集合Dを配列に格納するPerlのプログラムを配列を使って作成せよ。
@D = ("j96050", "j96048", "j96004", "j96002", "j96007");
print "D = { @D } \n\n";

# 集合Eを生成するPerlのプログラムを配列を使って生成せよ。
@E = (@D, "j96047");
print "E = { @E } \n\n";

# 集合Hを生成するPerlのプログラムを配列を使って作成せよ。
@F = ("j96050", "j96048");
$F2 = join(" ",@F);
foreach $check ( @E ) {
    unless ($F2 =~ /$check/) { @H = (@H, $check); }
}
print "F = { @F } \n";
print "H = { @H } \n\n";

# f’およびf’gを表す集合を連想配列を使って作成してみよ。
$f2{"j96050"} = "永田美穂";
$f2{"j96048"} = "豊平絵梨";
$f2{"j96004"} = "天野嘉登";
$f2{"j96002"} = "赤嶺有平";
$f2{"j96007"} = "新垣武士";
$f2{"j96047"} = "友寄隆令";
print "f' = { ";
while (($key, $value) = each(%f2)) {
    print "($key, $value),";
}
print " } \n\n";

$f2g{"965750K"} = "永田美穂";
$f2g{"965748H"} = "豊平絵梨";
$f2g{"965704F"} = "天野嘉登";
$f2g{"965702K"} = "赤嶺有平";
$f2g{"965707A"} = "新垣武士";
$f2g{"965747K"} = "友寄隆令";
print "f'g= { ";
while (($key, $value) = each(%f2g)) {
    print "($key, $value),";
}
print " } \n";


 ◯ 実行結果

pw047: {2} % perl5 kono.pl
D = { j96050 j96048 j96004 j96002 j96007 } 

E = { j96050 j96048 j96004 j96002 j96007 j96047 } 

F = { j96050 j96048 } 
H = { j96004 j96002 j96007 j96047 } 

f' = { (j96007, 新垣武士),(j96002, 赤嶺有平),(j96047, 友寄隆令),(j96004, 天野嘉
登),(j96048, 豊平絵梨),(j96050, 永田美穂), } 

f'g= { (965702K, 赤嶺有平),(965747K, 友寄隆令),(965707A, 新垣武士),(965750K, 永
田美穂),(965704F, 天野嘉登),(965748H, 豊平絵梨), } 




>>> software:86

Subject: Report on Software Engineering Lecture 4/21
From:    j96027@pw027.st.ie.u-ryukyu.ac.jp (Toshiya Shikina)
Date:    Tue, 12 May 1998 14:26:48 +0900 (JST)
Cc:      j96027@pw027.st.ie.u-ryukyu.ac.jp



    識名俊也@情工3年次


    perlのレポート

●集合Dを配列に格納するperlのプログラムを配列を使って作成せよ。
 プログラム% 1.pl
$, = " ";
@hako = ( j96050, j96048, j96004, j96002, j96007 ),"\n";
print '@hako= ',@hako,"\n";

 実行結果% perl5 1.pl
@hako=  j96050 j96048 j96004 j96002 j96007 

●集合Eを生成するperlのプログラムを配列を使って作成せよ。
プログラム %  2.pl
$, = " ";
@hako = ( j96050, j96048, j96004, j96002, j96007 );
print '@hako= ',@hako,"\n";
@hako2 = ( j96027 );
print '@hako2=',@hako2,"\n";
@hako3 = ( @hako, @hako2 );
print '@hako3 =',@hako3,"\n";

実行結果 % perl5 2.pl
@hako=  j96050 j96048 j96004 j96002 j96007 
@hako2= j96027 
@hako3 = j96050 j96048 j96004 j96002 j96007 j96027 

●集合Hを生成するperlのプログラムを配列を使って作成せよ。
プログラム % 3.pl	
$, = " ";
@hako = ( j96050, j96048, j96004, j96002, j96007 );
print '@hako= ',@hako,"\n";
@hako2 = ( j96050, j96048 );
print '@hako2=',@hako2,"\n";
@lhash{@hako} = undef;
%result = %lhash;
foreach (@hako2){
     delete $result{$_};
}
print '@hako-@hako2=';
print keys %result,"\n";
@hako3 = ( j96027 );
print '@hako3=',@hako3,"\n";
@hako4 = ( %result, @hako3 );
print '@hako4=',@hako,"\n";

実行結果 %perl5 3.pl
@hako=  j96050 j96048 j96004 j96002 j96007 
@hako2= j96050 j96048 
@hako-@hako2=j96007 j96002 j96004 
@hako3= j96027 
@hako4= j96050 j96048 j96004 j96002 j96007 

●f`およびf`gを表す集合を連想配列を使って作成してみよ。
プログラム %  4.pl
$, =" ";
$x{'j96050'} = '永田美穂';
$x{'j96048'} = '豊平絵梨';
$x{'j96004'} = '天野嘉登';
$x{'j96002'} = '赤嶺有平';
$x{'j96007'} = '新垣武士';
print join("\n", %x );

$y{'965750K'} = '永田美穂';
$y{'965748H'} = '豊平絵梨';
$y{'965704F'} = '天野嘉登';
$y{'965702K'} = '赤嶺有平';
$y{'965707A'} = '新垣武士';
print "\n";
print join("\n",%y ),"\n";

実行結果 % perl5 4.pl
j96007
新垣武士
j96002
赤嶺有平
j96004
天野嘉登
j96048
豊平絵梨
j96050
永田美穂
965702K
赤嶺有平
965707A
新垣武士
965750K
永田美穂
965704F
天野嘉登
965748H
豊平絵梨