程序员视角下的计算机系统:ICS课程指南

需积分: 9 3 下载量 151 浏览量 更新于2024-07-20 收藏 12.06MB PDF 举报
《计算机系统:程序员视角》是一本由卡内基梅隆大学的Randal E. Bryant教授和David R. O'Hallaron教授合著的计算机科学教材,旨在为学生和专业人士提供深入理解计算机系统的基础知识,特别关注于程序设计者的角度。本书是ICS(信息技术课程)的核心参考书,适用于那些希望在计算机领域深化理解的人群,特别是对于学习C语言的开发者。 书中内容涵盖了计算机系统的基础原理,包括硬件、操作系统、内存管理、处理器架构、网络通信以及数据结构和算法等核心概念。作者通过程序设计者的视角,将抽象的理论与实际编程实践相结合,使读者能够更好地理解这些技术如何在底层协作,从而提高他们的编程效率和问题解决能力。 作为一本实用教材,书中可能包含详细的示例代码、系统剖析和解释,让读者能够在实践中掌握理论知识。此外,书中还可能探讨了计算机系统的演变历史,以及未来发展趋势,帮助读者保持对最新技术的敏锐洞察。 值得注意的是,《计算机系统:程序员视角》的版式设计简洁明了,便于阅读,配有图表和插图,以增强理解和记忆。它不仅适合在校学生进行深度学习,也适合经验丰富的工程师作为参考手册,不断更新和巩固他们的专业知识。 编辑团队的专业性体现在各个环节,从Marcia Horton担任的编辑总监,到Matt Goldstein负责的图书采购,再到艺术设计、印刷和制作人员的精心协作,确保了本书的质量和内容完整性。无论是对于学生还是教师来说,这都是一本不可多得的计算机系统教学资源。

public class ComputerSystem extends JFrame{ private Vector<Computer> computers; private JButton button_Start; private JPanel panel0; private JDialog dialog_enter1; private final String[][] StaffLists = {{"p1","p1"},{"p2","p2"},{"p3","p3"},{"m1","m1"},{"m2","m2"}}; public ComputerSystem(Vector<Computer> computers){ this.computers = computers; setLayout(null); panel0 = new JPanel(); JLabel label = new JLabel(new ImageIcon("")); panel0.add(label); getContentPane().add(panel0); button_Start = new JButton("Click to login",new ImageIcon("ComputerStore.png"));//这个图片整不上去,最后整一个,好看 add(button_Start); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); button_Start.setBounds(5,5,400,150); button_Start.setHorizontalTextPosition(SwingConstants.RIGHT); button_Start.setVerticalTextPosition(SwingConstants.CENTER); button_Start.setFont(new Font("黑体",Font.BOLD,40)); public class Main { public static void main(String[] args) { //Computer[] computers = new Computer[999]; Vector<Computer> computers = new Vector<>(999); Scanner scanner = null; int i = -1; try { scanner = new Scanner(new BufferedReader(new FileReader("C:\Users\86137\Desktop\Computer.txt"))); String item; try { while (scanner.hasNext()) { i++; item = scanner.nextLine(); String[] cols = item.split(","); if(Objects.equals(cols[0], "Desktop PC")){ computers.add(new Desktop(cols[0], cols[1], cols[2], cols[3], cols[4], Integer.valueOf(cols[7]), Integer.valueOf(cols[5]), Integer.valueOf(cols[6]))); } if(Objects.equals(cols[0], "Laptop")){ computers.add(new Laptop(cols[0], cols[1], cols[2], cols[3], cols[4], Integer.valueOf(cols[8]), Integer.valueOf(cols[5]), Integer.valueOf(cols[6]), Double.valueOf(cols[7]))); } if(Objects.equals(cols[0], "Tablet")){ computers.add(new Tablet(cols[0], cols[1], cols[2], cols[3], cols[4], Integer.valueOf(cols[6]), Double.valueOf(cols[5]))); } // computers[i].category = cols[0]; // computers[i].Type = cols[1]; // computers[i].ID = cols[2]; // computers[i].Brand = cols[3]; // computers[i].CPU_Family = cols[4]; // computers[i].Price = Integer.valueOf(cols[5]); } }finally { if (scanner != null) { scanner.close(); } } } catch (IOException e) { e.printStackTrace(); } ComputerSystem computerSystem = new ComputerSystem(computers); computerSystem.setTitle("Computer Products Management System"); computerSystem.setSize(700,300); computerSystem.setLocationRelativeTo(null); computerSystem.setVisible(true); computerSystem.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); // TableFilterDemo demo = new TableFilterDemo(computers); } }这段代码为什么无法呈现按钮和图片。 一些类没给你,不影响

2023-05-25 上传