HW3.9】的更多相关文章

改好的controller //yuec2 Yue Cheng package hw3; import java.io.File; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.List; import hw3.Female; import hw3.Male; import hw3.NutriProfiler; import hw3.Model; import hw3.Product; i…
一.项目说明 给定数据集train.csv,要求使用卷积神经网络CNN,根据每个样本的面部图片判断出其表情.在本项目中,表情共分7类,分别为:(0)生气,(1)厌恶,(2)恐惧,(3)高兴,(4)难过,(5)惊讶和(6)中立(即面无表情,无法归为前六类).所以,本项目实质上是一个7分类问题. 数据集介绍: (1).CSV文件,大小为28710行X2305列: (2).在28710行中,其中第一行为描述信息,即“label”和“feature”两个单词,其余每行内含有一个样本信息,即共有28709…
(a):可绘制出如下图所示的流程图 (b):对于测试用例t1=(n=3)和t2=(n=5),MAXPRIMES = 4时,t1不能检查出错误,而t2则会发生数组越界错. (c):要使测试路径不通过while循环体,只要numPrimes = n,直接取n = 1为测试用例即可. (d):节点覆盖:{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15} 边覆盖:{(1,2),(2,3),(2,12),(3,4),(4,5),(5,6),(5,9),(6,7),(7,5),(7,…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter circle1's center x-, y-coordinates, and radius: "); double x1 = input.nextDouble(); double…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter r1's center x-, y-coordinates, width, and height: "); double x1 = input.nextDouble(); doub…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter a point's x- and y-coordinates: "); double x = input.nextDouble(); double y = input.next…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter an integer: "); int number = input.nextInt(); input.close(); System.out.print("Is &qu…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter three edges: "); double side1 = input.nextDouble(); double side2 = input.nextDouble(); dou…
public class Solution { public static void main(String[] args) { int number = (int)(Math.random() * 12 + 1); int suit = (int)(Math.random() * 3 + 1); String numberString = ""; String suitString = ""; switch(number) { case 1: numberStri…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter a point with two coordinates: "); double x = input.nextDouble(); double y = input.nextDoub…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter a point with two coordinates: "); double x = input.nextDouble(); double y = input.nextDoub…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter year: (e.g., 2008): "); int year = input.nextInt(); System.out.print("Enter month: 1-…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter the temperature in Fahrenheit: "); double temperature = input.nextDouble(); System.out.pri…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter three edges: "); double side1 = input.nextDouble(); double side2 = input.nextDouble(); dou…
import javax.swing.JOptionPane; public class Solution { public static void main(String[] args) { String yearString = JOptionPane.showInputDialog(null, "Enter a year: \n", JOptionPane.QUESTION_MESSAGE); int year = Integer.parseInt(yearString); bo…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("scissor(0), rock(1), paper(2): "); int playerValue = input.nextInt(); input.close(); int compute…
public class Solution { public static void main(String[] args) { int randomValue = (int)(Math.random() * 65 + 26); char randomChar = (char)randomValue; System.out.println(randomChar); } }…
import java.util.Scanner; public class Solution { public static void main(String[] args) { int lottery = (int)(Math.random() * 900 + 100); Scanner input = new Scanner(System.in); System.out.print("Enter your lottery pick(three numbers): "); int…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Please guess the coin, 0 for negative and 1 for positive: "); int number = input.nextInt(); in…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter the taxable income: "); double income = input.nextDouble(); input.close(); double tax = 0;…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter a number: "); int number = input.nextInt(); input.close(); if(number % 5 == 0 && n…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter the month: "); String month = input.nextLine(); System.out.print("Enter the year: &qu…
public class Solution { public static void main(String[] args) { int number1 = (int)(Math.random() * 100); int number2 = (int)(Math.random() * 100); System.out.println(number1 + " + " + number2 + " = ? "); } }…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter the ISBN: "); int d1 = input.nextInt(); int d2 = input.nextInt(); int d3 = input.nextInt()…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Please enter n1: "); int n1 = input.nextInt(); System.out.print("Please enter n2: ");…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter an amount in int, for example 11.56: "); double amount = input.nextDouble(); int remaining…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter weight in pounds: "); double weight = input.nextDouble(); System.out.print("Enter hei…
import java.util.Scanner; public class Solution { public static void main(String[] args) { int n1 = (int)(Math.random() * 10); int n2 = (int)(Math.random() * 10); int n3 = (int)(Math.random() * 10); Scanner input = new Scanner(System.in); System.out.…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); int number1 = (int)(Math.random() * 100); int number2 = (int)(Math.random() * 100); System.out.print(number1 + " + &quo…
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter a, b, c, d, e, f: "); double a = input.nextDouble(); double b = input.nextDouble(); double…