
软件体系结构
Li_yy123
hi
展开
-
主程序—子程序软件体系结构
主程序—子程序软件体系结构例:#include int max(int x,int y){ int z; z = x > y ? x : y; return( z );}int main(){ int a,b,c ; scanf("%d,%d",&a,&b); c=max(a,b); printf("原创 2017-03-27 16:06:12 · 4326 阅读 · 0 评论 -
软件设计目标—可维护性—基于面向对象技术的计算机程序
import java.io.*;class client{public static void main(String[] args){ int intNumberA=0, intNumberB=0; try{ BufferedReader bufR = new BufferedReader(new InputStreamReader(System.in));原创 2017-05-22 17:12:43 · 582 阅读 · 0 评论 -
软件设计目标—健壮性
import java.io.*;public class CommandLineCalculator { private int accumulatedValue=0; public CommandLineCalculator(){ super(); } private static String getAnInputFromUser() { try原创 2017-05-22 16:44:17 · 2329 阅读 · 0 评论 -
软件设计目标—正确性
用Java语言实现一个计算器程序import java.io.*;public class Calculator { public static void main(String[] args) throws IOException{ BufferedReader b= new BufferedReader(new InputStreamReader(System.in));原创 2017-05-22 16:25:53 · 1231 阅读 · 0 评论 -
体系结构—工厂方法模式
编写一个工厂方法模式的程序public interface clothingType { public void getType(); //打印选择的服装类型}public class t_shirt implements clothingType{ @Override public void getType() { System.out.println("您选择的是T恤原创 2017-05-29 13:00:09 · 489 阅读 · 0 评论 -
体系结构—简单工厂模式
编写一个简单工厂模式的程序public interface clothingType { public void getType(); //打印选择的服装类型}public class t_shirt implements clothingType{ @Override public void getType() { System.out.println("您选择的是原创 2017-05-29 12:55:23 · 604 阅读 · 0 评论 -
体系结构—基于事件的隐式调用风格
基于事件的隐式调用风格import java.awt.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;class BtnLabelAction extends Frame implements ActionListener{ //声明窗口类(BtnLabelAction)并实现动作原创 2017-04-24 17:20:50 · 1905 阅读 · 0 评论 -
体系结构—C/S体系结构风格
tcpServer.javaimport java.io.*;import java.net.*;public class tcpServer { public static final int PORT=8888; public static void main(String[] args) throws IOException{ //建立ServerSock原创 2017-04-24 17:15:43 · 3782 阅读 · 0 评论 -
体系结构—批处理风格
程序一:#include #includeint main(){ char c; FILE *fp=NULL; fp=fopen("data.txt","rt"); if(!fp) { printf("open error\n"); exit(1); } printf("输出文件中的字符:\n");原创 2017-04-18 13:26:15 · 2390 阅读 · 0 评论 -
体系结构—层次风格
第一层为用户界面层package sss;import java.awt.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.*;public class TestingGUI extends JFrame{ //申明需要的组件 pr原创 2017-04-18 13:22:15 · 1000 阅读 · 0 评论 -
体系结构—管道-过滤器风格
import java.io.IOException;import java.nio.ByteBuffer;import java.nio.channels.Pipe;public class Fp { public static void main(String[] args) throws IOException { Pipe lyy_pipe = Pipe.open();原创 2017-04-18 13:13:59 · 3950 阅读 · 0 评论 -
面向对象软件体系结构
面向对象软件体系结构例:class Spot{ private int x,y; Spot(int u, int v){ setX(u); setY(v); } void setX(int x1){ x=x1; } void setY(int y1){ y=y原创 2017-03-27 16:13:25 · 3206 阅读 · 0 评论 -
软件设计目标—基于简单工厂模式的计算器程序
interface Operation{ public int getResult(int numberA, int numberB);}class OperationAdd implements Operation{public int getResult(int numberA, int numberB){ return numberA + numb原创 2017-05-22 17:28:13 · 925 阅读 · 3 评论