This repository was archived by the owner on Dec 28, 2024. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 5 files changed +46
-12
lines changed 
src/main/java/ru/mirea/practice/s0000001 Expand file tree Collapse file tree 5 files changed +46
-12
lines changed Original file line number Diff line number Diff line change 1010    </parent >
1111    <artifactId >23K1302-p18</artifactId >
1212    <description >Задание 18</description >
13-     <build >
14-         <plugins >
15-             <plugin >
16-                 <groupId >org.apache.maven.plugins</groupId >
17-                 <artifactId >maven-compiler-plugin</artifactId >
18-                 <configuration >
19-                     <source >14</source >
20-                     <target >14</target >
21-                 </configuration >
22-             </plugin >
23-         </plugins >
24-     </build >
2513</project >
Original file line number Diff line number Diff line change 1+ <?xml  version =" 1.0"  encoding =" UTF-8"  ?>
2+ <project  xmlns =" http://maven.apache.org/POM/4.0.0"   xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" 
3+          xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"  >
4+     <modelVersion >4.0.0</modelVersion >
5+     <parent >
6+         <artifactId >23K1302</artifactId >
7+         <groupId >ru.mirea.practice</groupId >
8+         <version >2024.1</version >
9+         <relativePath >../pom.xml</relativePath >
10+     </parent >
11+     <artifactId >23K1302-p19</artifactId >
12+     <description >Задание 19</description >
13+ </project >
Original file line number Diff line number Diff line change 1+ package  ru .mirea .practice .s0000001 ;
2+ 
3+ public  final  class  Ex1  {
4+ 
5+     private  Ex1 () {
6+         // NONE 
7+     }
8+ 
9+     public  static  void  main (String [] args ) {
10+         try  {
11+             String  inn  = "12345967890" ;
12+ 
13+             validateInn (inn );
14+             System .out .println ("Заказ успешно оформлен!" );
15+         } catch  (InvalidInnException  e ) {
16+             System .out .println ("Ошибка: "  + e .getMessage ());
17+         }
18+     }
19+ 
20+     public  static  void  validateInn (String  inn ) throws  InvalidInnException  {
21+         if  (inn .length () != 10 ) {
22+             throw  new  InvalidInnException ("Недействительный ИНН: "  + inn );
23+         }
24+     }
25+ }
Original file line number Diff line number Diff line change 1+ package  ru .mirea .practice .s0000001 ;
2+ 
3+ public  class  InvalidInnException  extends  Exception  {
4+     public  InvalidInnException (String  message ) {
5+         super (message );
6+     }
7+ }
Original file line number Diff line number Diff line change 3232        <module >23K1302-p16</module >
3333        <module >23K1302-p17</module >
3434        <module >23K1302-p18</module >
35+         <module >23K1302-p19</module >
3536    </modules >
3637</project >
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments