【Java】【OS】操作系统理发店问题通过应用小程序动态实现(1)

这篇具有很好参考价值的文章主要介绍了【Java】【OS】操作系统理发店问题通过应用小程序动态实现(1)。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

  • He/she will spend a random time on the chair before send the ready flag to the barber.

*/

public synchronized void sitBarberChair(BarberShopApplet applet, int id)

{

while(customerSofaQ[sofaBottom] != id)

{

System.out.println("Customer " + id + “is waiting for the chair turn”);

try{ wait(); } catch(InterruptedException e) { }

}

while(chairFull())

{

try { wait(); }catch(InterruptedException e) {}

}

customerSofaQ[sofaBottom] = 0;

sofaBottom =(sofaBottom+1)%sofaSize; //get up from sofa

customerOnSofa --;

customerOnChair ++;

for(int i = 1; i <= chairSize; i++)

{

if(customerChairQ[i] == 0)

{

customerChairQ[i] = id;

customerReady[i] = id;

i = chairSize; // get out of the loop

}

}

updateCustomerStatus(applet,id, 6);

repaint();

try{

applet.c[id].sleep((int) (Math.random()*frameDelay));

}catch(InterruptedException e) { }

notifyAll();

}

/* If there is a customer waiting and no cashier, a barber will be a cashier when he/she

  • is not cutting hair.

*/

public synchronized void getCashierLock(BarberShopApplet applet, int bid)

{

if((wantPayCount > 0) && (hasCashier!= 1))

{

hasCashier= 1;

cashierID = bid;

//updateBarberStatus(applet, bid, 9); // a cashier right now

repaint();

System.out.println(“Barber " + bid + " got the cashier Lock right now”);

notifyAll();

}

}

public synchronized void performCashier(BarberShopApplet applet, int bid)

{

while(wantPayCount > 0)

{

System.out.println(“Barber " + bid + " is a cashier right now”);

updateBarberStatus(applet, bid, 2);

try{ wait(); } catch(InterruptedException e) {}

}

cashierID = 0;

hasCashier= 0;

notifyAll();

}

/* The customer will wait for a cashier first, then wait for his/her turn to pay.

  • It will take random time to get the receipt, the customer then will leave the shop.

*/

public synchronized void waitPay(BarberShopApplet applet, int cid)

{

while(customerPayQ[payBottom] != cid)

{

if((applet.requestFlag == 1) && (cid == 3))

repaintFlag = 1;

try{ wait(); } catch(InterruptedException e) { }

}

if(applet.requestFlag == 1) // for 1st process in unfair situation

{

while(true)

{

try{ applet.c[cid].sleep((int) (Math.random()*frameDelay)); }

catch(InterruptedException e) { }

}

}

while(hasCashier!= 1)

{

try{ wait(); } catch(InterruptedException e) { }

}

try{ applet.c[cid].sleep((int) (Math.random()*frameDelay)); }

catch(InterruptedException e) {}

updateCustomerStatus(applet, cid, 9);

payBottom++;

wantPayCount --;

exitID = cid;

exitArray[exitTop] = cid;

exitTop ++;

customerCount --;

repaint();

notifyAll();

}

public synchronized void updateCustomerStatus(BarberShopApplet applet, int cid, int status)

{

applet.c[cid].status = status;

applet.mc.println(status, “c”, cid);

}

public synchronized void updateBarberStatus(BarberShopApplet applet, int bid, int status)

{

applet.b[bid].status = status;

applet.mc.println(status, “b”, bid);

}

public void clear()

{

size = 4; //default buffer size

customerCount = 0;

payTop = payBottom = 1;

chairTop = chairBottom = 0;

sofaTop = sofaBottom = 0;

customerTop= customerBottom= 1;

outTop = outBottom = 0;

finishedCustomerQ = new int[11];

customerOut = new int[2];

customerOnSofa = 0; //the count of customers on the sofa

customerOnChair = 0; //the count of customers on the barber chairs

customerStandCount = 0; //the count of customers standing

wantPayCount = 0; //the count of customers waiting for paying

hasCashier = 0;

cashierID = 0; //the barber ID for who is performing as a cashier

exitID = 0;

exitTop = 0;

repaintFlag = 0;

}

/*

  • Draw the barber shop on the canvas

*/

public void paint(Graphics g){

g.setFont(new Font(“TimesRoman”, Font.BOLD, 12));

g.setColor(Color.blue);

int xpos = 120;

int ypos = 10;

g.setFont(new Font(“TimesRoman”, Font.BOLD, 18));

/************************************/

/* Draw Barber Chairs on the canvas */

/************************************/

g.drawString(“Barber Chairs”, xpos+150, ypos+5);

for(int i = 1; i <= chairSize; i++)

{

g.draw3DRect(xpos+100+70*(i-1), ypos+20, 28, 28, true);

if(i != cashierID) g.drawString(“B”+i, xpos+103+70*(i-1), ypos+70);

}

g.setColor(Color.red);

for(int j=1; j <= chairSize; j ++)

{

if(customerChairQ[j] != 0)

{

g.drawString(Integer.toString(customerChairQ[j]), xpos + 105 + 70*(j-1), ypos+35);

g.draw3DRect(xpos+100+70*(j-1), ypos+20, 28, 28, true);

}

}

/**********************************/

/* Draw Cashier’s waiting queue */

/*********************************/

g.setColor(Color.blue);

g.drawString(“Cashier”, xpos+410, ypos+45);

g.setFont(new Font(“TimesRoman”, Font.BOLD, 14));

if(cashierID != 0)

{

g.drawString("B "+cashierID, xpos+430, ypos+20);

}

g.draw3DRect(xpos+410, ypos+60, 60, 20, true);

g.setFont(new Font(“TimesRoman”, Font.BOLD, 12));

int b = payBottom;

System.out.println("wantPaycount is " + wantPayCount);

if(repaintFlag == 1)

{

for(int i = 0; i < 3; i++)

{

if(customerPayQ[i+b] != 0)

g.drawString(“C”+customerPayQ[i+b], xpos+430, ypos+100);

ypos += 20;

}

}

else

{

for(int i = 0; i < wantPayCount; i++)

{

if(customerPayQ[i+b] != 0)

g.drawString(“C”+customerPayQ[i+b], xpos+430, ypos+100);

ypos += 20;

}

}

/**********************************/

/* Draw standing room on canvas */

/**********************************/

g.setFont(new Font(“TimesRoman”, Font.BOLD, 12));

ypos = 10;

g.drawString(“Standing Room Area”, xpos-100, ypos+160);

b = customerBottom;

for(int i = 0; i < customerStandCount; i++)

{

g.drawString(“C”+(i+b), xpos+80-25*i, ypos+120);

}

g.setColor(Color.green);

g.drawString(“Entrance”, xpos-110, ypos+100);

g.drawString(“--------->”, xpos-110, ypos+105);

g.setColor(Color.red);

System.out.println("outTop is: " + outTop);

for(int i = outBottom; i <= outTop; i++)

{

if(customerOut[i] > 0)

g.drawString("C "+customerOut[i], xpos-80, ypos+80-20*i);

}

g.setColor(Color.red);

g.drawString(“Exit”, xpos+530, ypos+10);

for(int i = 0; i < exitTop; i++)

{

if(exitArray[i] != 0)

g.drawString(“C” + exitArray[i], xpos+530, ypos+25+15*i);

}

/**********************************/

/* Draw waiting Sofa on canvas */

/**********************************/

xpos = 100;

ypos = 10;

g.setColor(Color.blue);

g.drawString(“Sofa”, xpos+225, ypos+185);

for(int i = 0; i < sofaSize; i++)

{

g.draw3DRect(xpos+180+28*(i), ypos+140, 28, 28, true);

}

g.setColor(Color.red);

int k = sofaBottom;

for(int j=0; j < customerOnSofa; j++)

{

g.drawString(Integer.toString(customerSofaQ[k]), xpos + (190+283) -28(j), ypos+155);

g.draw3DRect(xpos+180+283 - 28(j), ypos+140, 28, 28, true);

k = (k+1)%sofaSize;

}

}

}

(3)BarberShopApplet.java


/* File: BarberShopApplet.java

  • This is a Java applet file for Barbershop problem animation. The GUI

  • of this applet contains three parts: animation canvas, message canvas

  • and a button panel.

  • The animation canvas is where the Barbershop animation is displayed.

  • The message canvas is where the statues of barbers and customers are displayed.

  • The button panel has 6 basic buttons: START, STOP, PAUSE, CONTINUE, FASTER,

  • SLOWER.

  • This applet will allow user to choose from a fair barbershop or unfair barbershop.

  • In the fair barbershop, unless the user choose the number of customers, default

  • number of the customers is 4.

  • The number of customers in the unfair barbershop is also 4. And there are two

  • unfair situations that the user can choose from.

*/

import java.awt.*;

import java.awt.event.*;

import java.util.*;

import java.applet.Applet;

import java.lang.*;

public class BarberShopApplet extends Applet

{

private BarberShopApplet applet = this;

private BarberShop myShop;

private Button fastButton, slowButton, stopButton, startButton,pauseButton, continueButton;

private Panel buttonPanel, namePanel, namePanel2;

private Checkbox haltResource, requestResource;

private Choice customer;

private int customerN = 4; //default number of customer and barber

private int barberN = 3;

private Thread at;

MessageCanvas mc;

Customer[] c;

Barber[] b;

int haltFlag = 0;

int requestFlag = 0;

synchronized void startPushed() {notify();}

synchronized void stopPushed() {notify();}

public void init() {

resize(800, 600);

setLayout(new GridLayout(3, 1));

myShop = new BarberShop();

mc = new MessageCanvas();

add(myShop); //add BarberShop canvas at the top

add(mc); //add message box canvas in the middle

buttonPanel = new Panel();

Panel namePanel = new Panel();

Panel bPanel = new Panel(); // to hold all buttons and the labels

bPanel.setFont(new Font(“TimesRoman”, Font.BOLD, 14));

bPanel.setLayout(new GridLayout(3, 1));

buttonPanel.add(startButton = new Button(“START”));

buttonPanel.add(stopButton = new Button(“STOP”));

buttonPanel.add(pauseButton = new Button(“PAUSE”));

buttonPanel.add(continueButton = new Button(“CONTINUE”));

buttonPanel.add(fastButton = new Button(“FAST”));

buttonPanel.add(slowButton = new Button(“SLOW”));

Label titleLabel = new Label(“Fair Barbershop”, Label.CENTER);

titleLabel.setFont(new Font(“TimesRoman”, Font.BOLD, 16));

titleLabel.setForeground(Color.blue);

Label textLabel = new Label(“Maximum Shop Capacity is 8 Customers”, Label.CENTER);

Label titleLabel2 = new Label("Unfair Barbershop ", Label.CENTER);

Label textLabel2 = new Label(“4 Customers In The Shop”, Label.CENTER);

titleLabel2.setFont(new Font(“TimesRoman”, Font.BOLD, 16));

titleLabel2.setForeground(Color.blue);

namePanel.setLayout(new GridLayout(2,1));

namePanel.add(titleLabel);

namePanel.add(textLabel);

namePanel2 = new Panel();

namePanel2.setLayout(new GridLayout(2,1));

namePanel2.add(titleLabel2);

namePanel2.add(textLabel2);

Panel titlePanel = new Panel();

titlePanel.setLayout(new GridLayout(1,2));

titlePanel.add(namePanel);

titlePanel.add(namePanel2);

Panel choicePanel = new Panel(); //to hold all the choice boxes

choicePanel.setLayout(new GridLayout(1,2));

customer = new Choice();

for(int i = 1; i <=10; i++)

{

customer.addItem(Integer.toString(i));

}

customer.select(“4”);

Label customerLabel = new Label(“Number of Customers”, 2);

customerLabel.setBackground(Color.lightGray);

Panel customerPanel = new Panel();

customerPanel.add(customerLabel);

customerPanel.add(customer);

Panel unfairPanel = new Panel();

unfairPanel.setLayout(new GridLayout(2,1));

CheckboxGroup g = new CheckboxGroup();

unfairPanel.add(haltResource = new Checkbox(“Request finished, but resources are held unnecessarily”, g, false));

unfairPanel.add(requestResource = new Checkbox(“Request not finished, but resources are released”, g, false));

choicePanel.add(customerPanel);

choicePanel.add(unfairPanel);

bPanel.add(titlePanel);

bPanel.add(choicePanel);

bPanel.add(buttonPanel);

add(bPanel);

}

public boolean action(Event evt, Object arg)

{

if(evt.target == customer)

{

customerN = Integer.parseInt(arg.toString());

haltResource.setEnabled(false);

requestResource.setEnabled(false);

return true;

}

else if(evt.target == haltResource)

{

startButton.setEnabled(false);

customer.setEnabled(false);

stopButton.setEnabled(true);

haltResource.setEnabled(false);

requestResource.setEnabled(false);

haltFlag = 1;

System.out.println(“HaltResource”);

customerN = 4;

myShop.setSize(customerN);

c = new Customer[customerN+1]; //Customer[0] is a dummy slot

b = new Barber[barberN+1];

mc.setMessage(barberN, customerN);

for(int i = 1; i <= customerN; i++)

{

c[i] = new Customer(applet, myShop, i);

}

for(int i = 1; i <= barberN; i++)

{

b[i] = new Barber(applet, myShop, i);

}

for(int i = 1; i <= barberN; i++)

{

b[i].start();

}

for(int i = 1; i <= customerN; i++)

{

c[i].start();

}

return true;

}

else if(evt.target == requestResource)

{

startButton.setEnabled(false);

stopButton.setEnabled(true);

customer.setEnabled(false);

haltResource.setEnabled(false);

requestResource.setEnabled(false);

System.out.println(“RequestResource”);

requestFlag = 1;

customerN = 4;

myShop.setSize(customerN);

c = new Customer[customerN+1]; //Customer[0] is a dummy slot

b = new Barber[barberN+1];

mc.setMessage(barberN, customerN);

for(int i = 1; i <= customerN; i++)

{

c[i] = new Customer(applet, myShop, i);

}

for(int i = 1; i <= barberN; i++)

{

b[i] = new Barber(applet, myShop, i);

}

for(int i = 1; i <= barberN; i++)

{

b[i].start();

}

for(int i = 1; i <= customerN; i++)

{

c[i].start();

}

return true;

}

else if(arg.equals(“PAUSE”))

{ for(int i = 1; i <= customerN; i++)

{

if(c[i].isAlive()) c[i].suspend();

}

for(int i = 1; i <= barberN; i++)

{

if(b[i].isAlive()) b[i].suspend();

}

fastButton.setEnabled(false);

slowButton.setEnabled(false);

return true;

}

else if(arg.equals(“CONTINUE”))

{

for(int i = 1; i <= customerN; i++)

{

if(c[i].isAlive()) c[i].resume();

}

for(int i = 1; i <= barberN; i++)

{

if(b[i].isAlive()) b[i].resume();

}

fastButton.setEnabled(true);

slowButton.setEnabled(true);

return true;

}

else if(arg.equals(“FASTER”))

{

int newDelay = b[1].delay;

newDelay /= 2;

newDelay = newDelay < 100 ? 100: newDelay;

for(int i = 1; i <= customerN; i++)

{

c[i].delay = newDelay;

}

for(int i = 1; i <= barberN; i++)

{

b[i].delay = newDelay;

}

return true;

}

else if(arg.equals(“SLOWER”))

{

int newDelay = b[1].delay;

newDelay *= 2;

for(int i = 1; i <= customerN; i++)

{

c[i].delay = newDelay;

}

for(int i = 1; i <= barberN; i++)

{

b[i].delay = newDelay;

}

return true;

}

else if(arg.equals(“START”))

{

myShop.setSize(customerN);

c = new Customer[customerN+1]; //Customer[0] is a dummy slot

b = new Barber[barberN+1];

mc.setMessage(barberN, customerN);

for(int i = 1; i <= customerN; i++)

{

c[i] = new Customer(applet, myShop, i);

}

for(int i = 1; i <= barberN; i++)

{

b[i] = new Barber(applet, myShop, i);

}

for(int i = 1; i <= barberN; i++)

{

b[i].start();

}

for(int i = 1; i <= customerN; i++)

{

c[i].start();

}

applet.startPushed();

stopButton.setEnabled(true);

startButton.setEnabled(false);

fastButton.setEnabled(true);

slowButton.setEnabled(true);

customer.setEnabled(false);

haltResource.setEnabled(false);

requestResource.setEnabled(false);

return true;

}

else if(arg.equals(“STOP”))

{

try{

for(int i = 1; i <= customerN; i++)

{

if(c[i].isAlive()) c[i].stop();

c[i] = null;

}

for(int i = 1; i <= barberN; i++)

{

if(b[i].isAlive()) b[i].stop();

b[i] = null;

}

}catch(Exception e) {}

myShop.clear();

applet.stopPushed();

haltFlag = 0;

requestFlag = 0;

startButton.setEnabled(true);

customer.setEnabled(true);

haltResource.setEnabled(true);

requestResource.setEnabled(true);

fastButton.setEnabled(true);

slowButton.setEnabled(true);

if(at != null) at.stop();

at = null;

return true;

}

else{ return false;}

}

}

(4)Cusomer.java


/* Customer.java

  • The Customer Thread’s main activities are call the methods in Barbershop class.

*/

public class Customer extends Thread{

private BarberShopApplet tapplet;

private BarberShop shop;

private int cid;

int delay = 2500;

int status = 0;

int cutFinish = 0;

int barberID = 0;

int paid = 0;

public Customer(BarberShopApplet applet, BarberShop iq, int id){

shop = iq;

tapplet = applet;

cid = id;

}

public void run(){

try{

status = 0;

tapplet.mc.println(status, “c”, cid);

shop.sitSofa(tapplet, cid);

sleep(delay);

shop.sitBarberChair(tapplet, cid);

shop.waitPay(tapplet, cid);

} catch(InterruptedException e){

System.err.println("Customer Exception " + e.toString());

}

}

}

(5)MessageCanvas.java


/* File: MessageCanvas.java

  • This class provides message canvas for the applet GUI.

  • It will print the statuses of customers and barbers on the GUI.

*/

import java.awt.*;

class MessageCanvas extends Canvas

{

private Font font;

private FontMetrics fm;

private int[] barberStatus;

private int[] customerStatus;

private int[] serviceStatus; //store the customer id that is cutting hair for each barber

//serviceStatus[i]=j, Barber i is cutting hair for customer j

private int msgHeight;

private int msgWidth;

private int bn, cn;

private int frameDelay = 256;

public MessageCanvas( )

{

resize(size().width, 50);

setBackground(Color.green);

font = new Font(“TimesRoman”, 1, 18);

fm = getFontMetrics(font);

msgHeight = fm.getHeight();

}

public void setMessage(int barberN, int customerN)

{

bn = barberN;

cn = customerN;

barberStatus = new int[bn+1];

customerStatus = new int[cn+1];

serviceStatus = new int[bn+1];

repaint();

}

void println(String s)

{

msgWidth = fm.stringWidth(s);

repaint();

}

void println(int s, String st, int id)

{

if(st.equals(“b”))

barberStatus[id] = s;

else

customerStatus[id] = s;

repaint();

}

void println(int s, String st, int id, int cid)

{

if(st.equals(“b”))

{ barberStatus[id] = s;

serviceStatus[id] = cid;

}

else

customerStatus[id] = s;

repaint();

}

public void paint(Graphics g)

{

g.setFont(font);

int xpos = 40;

int ypos = 30;

g.drawString("Status of Customers: ", 60, 20);

g.drawString("Status of Barbers: ", 380, 20);

g.setFont(new Font(“TimesRoman”, 1, 12));

for(int i=1; i<=cn;i++)

{

g.setColor(Color.black);

g.drawString(“C” + i, xpos, ypos+(12i+5(i-1)));

if(customerStatus[i] == 0)

{

g.setColor(Color.yellow);

g.fillOval(xpos+40, ypos+(2i+15(i-1)), 14, 14);

g.drawString(“Standing …”, xpos+80, ypos+(12i + 5(i-1)));

}

else if (customerStatus[i] == 1)

{

g.setColor(Color.gray);

g.fillOval(xpos+40, ypos+(2i+15(i-1)), 14, 14);

g.drawString(“Cutting Hair…”, xpos+80, ypos+(12i + 5(i-1)));

}

else if (customerStatus[i] == 2)

{

g.setColor(Color.blue);

g.fillOval(xpos+40, ypos+(2i+15(i-1)), 14, 14);
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数Java工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年Java开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。【Java】【OS】操作系统理发店问题通过应用小程序动态实现(1),程序员,java,小程序,开发语言

【Java】【OS】操作系统理发店问题通过应用小程序动态实现(1),程序员,java,小程序,开发语言

【Java】【OS】操作系统理发店问题通过应用小程序动态实现(1),程序员,java,小程序,开发语言

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Java开发知识点,真正体系化!

由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!

如果你觉得这些内容对你有帮助,可以扫码获取!!(备注Java获取)

【Java】【OS】操作系统理发店问题通过应用小程序动态实现(1),程序员,java,小程序,开发语言

总结

机会是留给有准备的人,大家在求职之前应该要明确自己的态度,熟悉求职流程,做好充分的准备,把一些可预见的事情做好。

对于应届毕业生来说,校招更适合你们,因为绝大部分都不会有工作经验,企业也不会有工作经验的需求。同时,你也不需要伪造高大上的实战经验,以此让自己的简历能够脱颖而出,反倒会让面试官有所怀疑。

你在大学时期应该明确自己的发展方向,如果你在大一就确定你以后想成为Java工程师,那就不要花太多的时间去学习其他的技术语言,高数之类的,不如好好想着如何夯实Java基础。下图涵盖了应届生乃至转行过来的小白要学习的Java内容:

请转发本文支持一下

【Java】【OS】操作系统理发店问题通过应用小程序动态实现(1),程序员,java,小程序,开发语言

【Java】【OS】操作系统理发店问题通过应用小程序动态实现(1),程序员,java,小程序,开发语言

《一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码》点击传送门即可获取!
.drawString(“Standing …”, xpos+80, ypos+(12i + 5(i-1)));

}

else if (customerStatus[i] == 1)

{

g.setColor(Color.gray);

g.fillOval(xpos+40, ypos+(2i+15(i-1)), 14, 14);

g.drawString(“Cutting Hair…”, xpos+80, ypos+(12i + 5(i-1)));

}

else if (customerStatus[i] == 2)

{

g.setColor(Color.blue);

g.fillOval(xpos+40, ypos+(2i+15(i-1)), 14, 14);
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数Java工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年Java开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。[外链图片转存中…(img-EZUZxIrn-1712071262124)]

[外链图片转存中…(img-Due4eRNm-1712071262124)]

[外链图片转存中…(img-QkYqeQxX-1712071262124)]

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Java开发知识点,真正体系化!

由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!

如果你觉得这些内容对你有帮助,可以扫码获取!!(备注Java获取)

【Java】【OS】操作系统理发店问题通过应用小程序动态实现(1),程序员,java,小程序,开发语言

总结

机会是留给有准备的人,大家在求职之前应该要明确自己的态度,熟悉求职流程,做好充分的准备,把一些可预见的事情做好。

对于应届毕业生来说,校招更适合你们,因为绝大部分都不会有工作经验,企业也不会有工作经验的需求。同时,你也不需要伪造高大上的实战经验,以此让自己的简历能够脱颖而出,反倒会让面试官有所怀疑。

你在大学时期应该明确自己的发展方向,如果你在大一就确定你以后想成为Java工程师,那就不要花太多的时间去学习其他的技术语言,高数之类的,不如好好想着如何夯实Java基础。下图涵盖了应届生乃至转行过来的小白要学习的Java内容:

请转发本文支持一下

[外链图片转存中…(img-2K3vkrzx-1712071262125)]

[外链图片转存中…(img-cXU45mrx-1712071262125)]

《一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码》点击传送门即可获取!文章来源地址https://www.toymoban.com/news/detail-856499.html

到了这里,关于【Java】【OS】操作系统理发店问题通过应用小程序动态实现(1)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • windows虚拟机安装Mac OS系统(操作图解)

    因为工作需要学习ios开发,但是苹果电脑申请了还没审批下来所以想着先搭建一个虚拟机来熟悉开发环境 安装环境 windows,vmware 16 Pro 一、准备工作         1.  vmware 16 Pro 下载          2. unlocker  下载地址,选择zip下载          3. macos12.6 (链接:https://pan.baidu

    2024年02月16日
    浏览(43)
  • Linux 操作系统(Cent OS虚拟机)——DHCP的安装与配置

    本次使用的虚拟机是CentOS 64位 的 一、安装DHCP服务器软件 1.配置网络环境 VMware Workstation 软件 上方工具栏选择编辑→虚拟网络编辑器,  自己的电脑上需要先点击“更改设置”,授予权限,如下图,如果没有这个选项则说明已经有权限,跳过这一步到下一步。  如果你的电脑

    2024年02月07日
    浏览(50)
  • 汽车电子笔记之:AUTOSA架构下的多核OS操作系统

    目录 1、AUTOSAR多核操作系统 1.1、OS Application 1.2、多核OS的软件分区 1.3、任务调度 1.4、核间任务同步 1.5、计数器、报警器、调度表 1.6、自旋锁与共享资源 1.7、核间通信IOC 1.8、OS Object中元素交互 1.9、多核OS的启动与关闭 2、多核OS注意事项 2.1、最小部署单元 2.2、核间通信及影

    2024年02月11日
    浏览(40)
  • 【操作系统OS】学习笔记:第二章 进程与线程 (上)【哈工大李治军老师】

    基于本人观看学习 哈工大李治军老师主讲的操作系统课程 所做的笔记,仅进行交流分享 特此鸣谢李治军老师,操作系统的神作! 如果本篇笔记帮助到了你,还请点赞 关注 支持一下 ♡𖥦)!! 主页专栏有更多,如有疑问欢迎大家指正讨论,共同进步! 给大家跳段街舞感谢支持

    2024年02月02日
    浏览(55)
  • 【Linux OS】华为openEuler操作系统与openGauss数据库安装及使用入门

    EulerOS 是华为自主研发的服务器操作系统,支持六种处理器架构:x86,Arm,RISC—V,LoongArch,SW64和Power,能够满足客户从传统IT基础设施到云计算服务的需求。 openEuler是EulerOS的开源社区版本。 官网OS镜像下载地址:https://www.openeuler.org/zh/download/ 推荐下载LTS版,当前最新版为:

    2024年02月08日
    浏览(42)
  • 【JAVA】云HIS系统使用和操作过程中的常见问题及解决方法

    一、门诊业务中遇到的问题 (1)门诊医生如何查询往期病人? 答: 点击门诊医生站左侧患者列表,在弹出的页面点击已诊分页,在搜索框输入患者姓名,在结果中找到对应患者,点击详情按钮即可查询患者往期就诊信息,点击想要查询的门诊记录前方的方框即可查询相应的

    2024年02月16日
    浏览(50)
  • 【华为云】基于华为云欧拉操作系统(HCE OS)容器化部署传统应用(Redis+Postgresql+Git+SpringBoot+Nginx)

    博文内容为 华为云欧拉操作系统入门级开发者认证(HCCDA – Huawei Cloud EulerOS) 实验笔记整理 认证地址:https://edu.huaweicloud.com/certificationindex/developer/9bf91efb086a448ab4331a2f53a4d3a1 博文内容涉及一个传统 Springboot 应用HCE部署, 以及相关数据库 Redis、Postgresql、Nginx 的容器化部署 理解不

    2024年02月22日
    浏览(59)
  • 【小黑嵌入式系统第十课】μC/OS-III概况——实时操作系统的特点、基本概念(内核&任务&中断)、与硬件的关系&实现

    上一课: 【小黑嵌入式系统第九课】PSoC 5LP第一个实验——LED、字符型LCD显示实验 下一课: 【小黑嵌入式系统第十一课】μC/OS-III程序设计基础(一)——任务设计、任务管理(创建基本状态内部任务)、任务调度、系统函数 一. 凡从事嵌入式系统开发工作的人,必须对嵌入

    2024年02月05日
    浏览(50)
  • 【操作系统-进程】PV操作——读者写者问题

    读者写者问题,其本质就是连续多个同类进程访问同一个临界资源的问题。 第一个进程开始访问临界资源前,需要对资源加上互斥锁,后面的进程再访问时就不用再对资源加互斥锁了,直到最后一个进程访问完后,发现自己是最后一个进程,就解锁互斥锁。这就像一种情况:

    2024年01月16日
    浏览(51)
  • 【操作系统】死锁问题---死锁的消除方法

    本文章将主要解释死锁的消除方法 一、死锁的概念         这是《操作系统》对于死锁的定义: 有并发进程P1,P2,…Pn,它们共享资源R1,R2,…Rm (n0,m0, n=m)。其中,每个Pi(1≤i≤n)拥有资源Rj(1≤j ≤m),直到不再有剩余资源。同时,各Pi又在不释放Rj的前提下要求Rk(k≠j,1≤k ≤m),

    2024年02月15日
    浏览(41)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包